In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> Hi all,
>
> Now I have a weird problem. I am using this code and can't understand why it
> doesn't work.
> When the script is run it returns a blank page, no error or done.
>
> here it is and any help would be appreciated.
>
> if(($type == book) or ($type == weapon)){
The above line is probably causing a problem. The values being compared
are probably being treated as constants, as they are not enclosed in
quotes. As you haven't declared the constants, there will be no match.
Try
if(($type == 'book') or ($type == 'weapon')){
> echo "<form action=\"$PHP_SELF\" method=\"post\">";
> echo "<SELECT NAME=\"sort\" SIZE=\"1\">";
> echo "<OPTION VALUE=\"shop\">Put in my shop</OPTION>";
> echo "<OPTION VALUE=\"locker\">Put into my Footlocker</OPTION>";
> echo "<OPTION VALUE=\"discard\">Discard this item</OPTION>";
> echo "<OPTION VALUE=\"donate\">Donate this item</OPTION>";
> echo "</SELECT>";
> echo "<INPUT TYPE=\"submit\" VALUE=\"Do It!\"submit\">";
>
>
>
> if(isset($submit))
> {
>
> if($sort == "shop")
> {
> echo "done" or die("Not!");
> }
> }
> }
> elseif($type==food)
Same problem as above
> {
>
> echo "<SELECT NAME=\"sort\" SIZE=\"1\">";
> echo "<OPTION VALUE=\"feed\">Feed my pet</OPTION>";
> echo "<OPTION VALUE=\"shop\">Put in my shop</OPTION>";
> echo "<OPTION VALUE=\"locker\">Put into my Footlocker</OPTION>";
> echo "<OPTION VALUE=\"discard\">Discard this item</OPTION>";
> echo "<OPTION VALUE=\"donate\">Donate this item</OPTION>";
> echo "</SELECT>";
> echo "<INPUT TYPE=\"submit\" VALUE=\"Do it!\" NAME=\"submit\">";
> echo "</form>";
>
>
> }
> }
> }
>
> Thanks for your time
> Jennifer
>
--
David Robley
Temporary Kiwi!
Quod subigo farinam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php