I have used header() to help me same page validate my form, so error messages appear on the same form page
<form name= "form" action="form.php" onsubmit="" method="post">
when all the error checking is done and valid i have used header("location:submitpage.php"); to transport me to submitpage.php where i was going to display all the results of my form, but i have realised that it doesn't work because it doesn't seem to know where the form or the varibles are.
so this on the submitpage.php
<h2>Welcome <?php echo $_POST["name"]; ?></h2><br>
only displays welcome as it doesn;t find $_POST["name"];
Is this a common problem and are there any magic fixes which i don't know about?
or after weeks of doing validation have i finally got it working to realise i cannot work out the actual results in a seperate page.