Forum Moderators: coopster
I've noticed this issue in my form. When the script checks for empty fields, if it finds any, it exits using die("empty fields found");. But the problem is that afterwards all the values that where inputed by the user are removed and I get a blank form with the error underneath it.
Is there any way for the form to stay filled after the die()?
Thank you
// form.php:
<html form>
..
if(isset($_GET['submit'])) {
$value1=$_POST['value1'];
$value2=$_POST['value2'];
$value3=$_POST['value3'];
if (empty($value1) ¦¦ empty($value2) ¦¦ empty($value3)) {
die ("Empty fields found"};
} else {
..
rest of php
..
}