Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where can i learn how to do CGI like stuff...

Status
Not open for further replies.

unborn

Programmer
Joined
Jun 26, 2002
Messages
362
Location
US
with php... im not sure what it is called but for my databaseless news script im sure would work alot better then my lame attempt to use a form button :/ is this easy to do? or mor complicated and i should wait till im further along?


thanks

in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
 
so there is no extra coding? like i would use it just as if it was passed from a form submit code? kickin! -goes checks it out :D

in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
 
There are 3 ways to pass variables to your script. Via FORM, via cookies or via php session. If you use FORM, there are 2 methods, POST and GET. The POST method is recomended to use when you send bigger amount of data, but the GET is the most commmon and it passes variables to the URL like sleipnir214 said. If you send this URL:
Code:
[URL unfurl="true"]http://www.url.com/news.php?a=100&b=200[/URL]
you will be able to access variables $a and $b in your news.php script and $a will have value of 100 and $b will have value of 200. I usually use this to pass variables to the script when the variables content can't help anyone to break the security.
 
I forgot to write that you will be able to access directly $a and $b variables only if you have register_global on in your php.ini. Otherwise you will have to access it as $_GET['a'] and $_GET['b'].
 
And to add to the register_global plethora of postings it should be again pointed out that register_globals is turned OFF since release 4.2.0 of PHP because it poses a security risk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top