Hi Sean:

Sean Hurley wrote:
> Agree <input type="checkbox" name="agree[]" value="agree">
> I Do Not Agree <input type="checkbox" name="disagree" value="disagree">
> if ($agree)  /* (I have tried this also with ($isset = $agree))  */
> { header ("location: ?link=form");
> }
> else
> { header ("location: /LETS");
> }

Several things here.  You're probably having problems because you defined
agree as an array (via the brackets in name="agree[]"), but in your code
you're examining it as a regular variable.  By the way "($isset = $agree)"
isn't real, at least in this context.  You mean "if ( isset($agree) ) {..."

Now, to do this job right...  First, use radio buttons.  Second, make
disagree the default.  Third examine the information in PHP.  Fourth, use a
full URL in the Location.  Fifth, write clean code, using indents to
demarcate nesting so your code is easier to read.

   <input type="radio" name="Agree" value="Y" /> I Agree
   <input type="radio" name="Agree" value="N" checked /> I Do Not Agree

   if ($Agree == 'Y') {
      header('Location: http://foo.org/?link=form');
   } else {
      header('Location: http://foo.org/LETS/');



                PHP scripts that make your job easier
         SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Ave, Brooklyn NY 11232    v: 718-854-0335    f: 718-854-0409

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to