I normally program in perl and am trying to translate one of my scripts to php.
The following snippet doesn't set the variable and I thought it would!
What the script does is to redirect to a different script depending on whether a query exists, and depending on the existence of a parameter if there is a query string.
I would like to know why, when calling without a query $scriptrl is not being set, and also how do I query a parameter from a GET call (equivalent of CGI
$var = param('variable');
Thanks,
Jon
$query = $_SERVER["QUERY_STRING"];
if(! isset($query))
{
$scriptrl = 'g_search.php';
}
Edited by jonnyfolk, 03 March 2010 - 02:17 PM.
changed script name for privacy reasons - no impact on thread!


Sign In
Create Account

Back to top









