RE: [PHP] Drop the var from var=$value

From: Date: Mon, 30 Oct 2000 10:33:45 +0000
Subject: RE: [PHP] Drop the var from var=$value
Groups: php.general 
Request: Send a blank email to php-general+get-22636@lists.php.net to get a copy of this message
The variable $QUERY_STRING will have everything which is passed after the ?. For Example, www.yourdomain.com/index.php?ShowIntroduction $QUERY_STRING will be "ShowIntroduction". Another useful one, is $PATH_INFO. You can have things such as: www.yourdomain.com/help.php/ProductB and in that case, $PATH_INFO would be "/ProductB". You can create some useful mixes betweeen $PATH_INFO, and $QUERY_STRING, or even with PATH_INFO & the other regular variables... I find this pretty useful, even in for processing and stuff... I make my script like this, for example: swith($PATH_INFO){ case "/process": DO SOMETHING WITH THE FORM DATA.... break; default: ?> <form action=http://yourdomain.com/YourScript.php/process method=get> BLAH BLAH BLAH <? } I also find it very useful when you want to have, for example: One file with "Company Info", but this info can be subdivided into different pages, such as "Company Info: What we Do?", "Company Info: Who we Are?","Company Info: Where we are located", and then, from a menu you can access: domain.com/company.php/What domain.com/company.php/Who or domain.com/company.php/Where... Hope this helps, Cheers, Roy > -----Original Message----- > From: CDitty [mailto:mail@redhotsweeps.com] > Sent: Monday, October 30, 2000 4:15 AM > To: php-general@lists.php.net > Subject: [PHP] Drop the var from var=$value > > > Never saw this one come through. Sorry if it is a duplicate.... > > Sorry, I couldn't figure out how else to work this. I have > seen sites that > have the url strings like > this....http://www.mydomain.com?value instead of > http://www.mydomain.com?val=value > > How can I get this to work on my pages? > > Thanks > > CDitty > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#22636) next »