Re: Re: Forms in PHP

From: Date: Fri, 12 Apr 2002 04:46:42 +0000
Subject: Re: Re: Forms in PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-92716@lists.php.net to get a copy of this message
On Friday 12 April 2002 09:19, Jennifer Downey wrote: > 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\">"; You haven't given your submit button a name... > > > > > > > > if(isset($submit)) Thus this test fails and you get no output. May I also suggest that you rewrite your echo statements as: echo '<OPTION VALUE="donate">Donate this item</OPTION>'; Vastly improves legibility. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* It was all so different before everything changed. */

« previous php.general (#92716) next »