Hello,
I am working on the script that will take you back to the input form if date is less than the required date.
There are two scripts. One is to for input that is bascially a form. Second saves the value in the database.
Second script checks if the date from the input script is less than 01/01/2000. If it is less then it takes the user back to the input form. Things go berfect till here.
When I am redirected back to the input form then all values are gone...Is there any way to preserve those values?
Here is the script that checks the date.
include('design/header.php');
require ('application.php');
$user = $_POST['user'];
$datevisit = $_POST['datevisit'];
if ($datevisit < "2000-01-01") {
echo "</head>
<body><form action=\"entry_form.php\" method=\"post\" name=\"errorform\" />
<input type=\"hidden\" name=\"IDnum\" value=\"$IDnum\" />
<script language=\"JavaScript\">document.errorform.submit();</script>
</body></html>";
}
else {
mysql_query("INSERT INTO DataCollection (partnerno,user) VALUES('$partnerno','$user')");