I tried -
// no errors! redirect the user to the thankyou page (or whatever)
else
{
//$message = "All fields have been validated successfully!";
// here you would either email the form contents to someone or store it in a database.
// To redirect to a "thankyou" page, you'd just do this:
header("Location: regform.php");
}
}
This worked ----- up to a point
An email was sent but no data was included : just the field names.