Re: Forms in PHP
| From: | Jennifer Downey | Date: | Fri, 12 Apr 2002 01:19:46 +0000 |
| Subject: | Re: Forms in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92693@lists.php.net to get a copy of this message | ||
Actually after the submit button is clicked it returns a blank page.
"Jennifer Downey" <jendowney@attbi.com> wrote in message
news:20020412011747.36869.qmail@pb1.pair.com...
> 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)){
> 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)
> {
>
> 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
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002