On Wed, 30 Oct 2002, Marek Kilimajer wrote: > I suppose this is just an excerpt, could you paste some more code here? > > [EMAIL PROTECTED] wrote: > > >On Wed, 30 Oct 2002, Rick Emery wrote: > >><? > >> > >>if ($_POST['var'] == "this") { > >>header("Location: scipt1.php"); exit;} > >> > >>if ($_POST['var'] == "that") { > >>header(Location: script2.php"); exit; }
My original code is: <? if ($_POST['var'] == "this") { header("Location: script1.php"); } if ($_POST['var'] == "that") { header("Location: script2.php"): } ?> <Stuff to do here if neither of these conditions match.> What I'm trying to accomplish here is to check the value of a variable against these two conditions at the very top of my script. If any one condition matches is sends the user to it's respective script as defined above. If neither of these conditions match it continues on with the script. I'm getting header already sent errors if I choose the variable that makes the second condition true. It works just fine If I choose to make the first condition true or choose to make both conditions false. Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php