Good day.
Faced a problem, but not quite understand why this is happening and how to get around.
There are 2 forms on the page, in each form there are 2 fields and 1 button.
<form action="" name="frm1" method="post"> <input type="text" name="fn" id="fn"/> <input type="text" name="ln" id="ln"/> <input type="submit" name='submitlogin1'/> </form> and
<form action="" name="frm2" method="post"> <input type="text" name="fn" id="fn"/> <input type="text" name="ln" id="ln"/> <input type="submit" name='submitlogin2'/> </form> Next is the handler:
if(isset($_POST['submitlogin1'])){ $name = $_POST["fn"]; header("Location: /list.php?name=$name"); } and
if(isset($_POST['submitlogin2'])){ $name = $_POST["ln"]; header("Location: /list.php?name=$name"); } Conditions are processed - but no forwarding occurs.
If I remove 1 form from page and leave 1 handler, everything works, redirection happens.
Why it does not want to work with two forms and how to get around this? Thank!
header("Location:...alsoexit();you need to do it. - Visman