...

View Full Version : How to add parameter to a PHP file?



frozenade
09-05-2007, 12:29 PM
Hi...
How to add parameter to a PHP file, like http://www.domain.com/search.php?q=line1+line2+line3

Thank you so much for helps.

best regards

rafiki
09-05-2007, 01:25 PM
www.com.com/search.php?q=line1&lang=en-gb&blah=ness


$query = $_GET['q']; // assign line 1 to $query
$lang = $_GET['lang']; // assign en-gb to $lang
$blah = $_GET['blah']; // assign ness to $blah
do stuff;

frozenade
09-09-2007, 05:49 AM
thank you... your help is very usefull for me... :)

how about '+' sign? how to implemented in address? like ...search.php?q=word1+word2

thank you...

Mwnciau
09-09-2007, 06:05 AM
If you wanted a + you would need to put %2B in instead, look at this page (http://www.degraeve.com/reference/urlencoding.php) if you want to include other characters



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum