note 5692 deleted from parse_url by ronabop
| From: | ronabop@php.net | Date: | Sat, 26 Aug 2000 07:00:33 +0000 |
| Subject: | note 5692 deleted from parse_url by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3394@lists.php.net to get a copy of this message | ||
To bigdan@kreft.net. Your reply was helpful for printing the value of the variable assigned from
the URL, but I can't seem to use the variable for comparisons or calculations. For example: I
want to use an IF statement to qualify the value of the variable and respond based on that. ASP is
simple this way - once a variable is defined such as foo = cInt(Request("foo")) and the
value from the URL string is "1" then foo = 1 and foo can be used in the way that I need
to use it.
However, with PHP I keep receiving a parse error when I try to do anything but output the value of
the variable. See below for the sample code.
<?php
echo $sh; // writes the value of $sh to the page, in this case = 1
echo $debug; // writes the value of $debug to the page, in this case = 1
if ($sh) = 1;
require ( 'include/file.inc' );
endif;
?>
Any input is welcomed!