Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(http://forum.qbasicnews.com/viewforum.php**?f=3**) ???
#1
Can someone explain what these things that look like variables are in the url box? They seem pretty useful and I'd like to know how to use them
Reply
#2
those are called parameters. they can either be POSTed via forms, or with GET parameters (in the URL). they're used by cgi programs (cgi by this def. encompassing all cgi alnguages).
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#3
These parameters are used by PHP and not by CGI...but you're right: they're very similar.
And now to you Megaman: Seek a PHP tutorial with google. I'm sure you'll find good stuff. If not, go to this link http://www.php.com. There is an additional way to learn PHP. Good luck
B 4 EVER
Reply
#4
Those are used as CGI parameters. With apache they are put into an environment variable and CGI programs can access. Python, Perl, PHP and even QB can access it on the right system and configurations.
Reply
#5
like i said, all cgi languages. Perl has been coined cgi and it's sort of a misnoma. Php, asp and perl all fall under "Common Gateway Interface".
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#6
Quote:like i said, all cgi languages. Perl has been coined cgi and it's sort of a misnoma. Php, asp and perl all fall under "Common Gateway Interface".

Yeah I know, I agree its really annoying to see people associate perl == CGI or CGI == perl; its probably because perl was one of the first popular ones(or something ;-) ). Also having some perl scripts end in .cgi doesn't help unconfuse people..
Reply
#7
Just a bit more on parameters. Your server creates a parameter string out of the GET and POST parameters, and stores them in environment variables. So you could even access them if you were running qb from the server with environ$. Most languages can parse them for you though, PHP has its inbred statements and Perl has its standard cgi module.

Since I you were interested in PHP, I think it stores parameters just in a variable of the same name. so where it says "t=2280" it stores "2280" into $t.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#8
I coded a stupid and easy tagboard. It is my first PHP program, so don't laugh: http://usuarios.lycos.es/firstqbasicforum/tagboard.php
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)