Re: Notice: Undefined index: op

From: Date: Tue, 22 Feb 2005 17:23:22 +0000
Subject: Re: Notice: Undefined index: op
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-38638@lists.php.net to get a copy of this message
On Tue, 2005-02-22 at 10:49, Matt M. wrote: > On Tue, 22 Feb 2005 10:47:43 -0600, Matt M. <h.dudeness@gmail.com> wrote: > > > if ($_POST['op'] != 'ds') { > > > $display_block = " > > > <form action=\"$_SERVER[PHP_SELF]\" method=\"POST\"> > > > Your E-mail Address: > > > <input type=text name=\"email\" size=40 maxlength=150/> > > > <input type=radio name=\"action\" value=\"sub\" > > > checked/>subscribe<br/> > > > <input type=radio name=\"action\" value=\unsub\" > > > />unsubscribe > > > <input type=\"hidden\" name=\"op\" > > > value=\"ds\"/> > > > <input type=submit name=\"submit\" value=\"Submit > > > Form\"/> > > > </form>"; > > > } > > > > try: > > > > if (isset($_POST['op']) && $_POST['op'] != 'ds') > > > > sorry for 2 emails, looks like you would want > if (!isset($_POST['op']) || $_POST['op'] != 'ds') > I vote for the first one. Bret

« previous php.db (#38638) next »