Page Query Help => page.php?q=...
Posted: Sun Dec 28, 2003 7:21 pm
Hi all!
I'm after a little help here;
page.php?q=xxxxx
i have page.php and i require a variable (q) to be filled by the URL, which ofcourse other pages can pass information from, e.g. search.php passes "hello" to page.php?q=hello .
I just want to detect what is in (q).
The thing is I have scraped to a halt at php.net, when I thought I was on the right trail with $_GET['q'] ... q being my variable, but all seems confusing, as when there is no [q=xxxx] in the URL, it wormies out with "Notice: Undefined index: q in C:\program files\Apache Group\Apache2\htdocs\TMP4kl57qmu9s.php on line 125"
I have tried
if ($_GET['q'] == null) {
} else {
echo $_GET['q'];
}
To begin with I was under the impression that $_GET['q']; was actually the variable $q ... but no.
It would be fantastic if you could help me out with any suggestions!
Gobo
I'm after a little help here;
page.php?q=xxxxx
i have page.php and i require a variable (q) to be filled by the URL, which ofcourse other pages can pass information from, e.g. search.php passes "hello" to page.php?q=hello .
I just want to detect what is in (q).
The thing is I have scraped to a halt at php.net, when I thought I was on the right trail with $_GET['q'] ... q being my variable, but all seems confusing, as when there is no [q=xxxx] in the URL, it wormies out with "Notice: Undefined index: q in C:\program files\Apache Group\Apache2\htdocs\TMP4kl57qmu9s.php on line 125"
I have tried
if ($_GET['q'] == null) {
} else {
echo $_GET['q'];
}
To begin with I was under the impression that $_GET['q']; was actually the variable $q ... but no.
It would be fantastic if you could help me out with any suggestions!
Gobo