Where is the submitting form? I assume it is a separate script. You can test the POSTed values and, when any of them is blank, re-display the form in the other script. like [php]
// Test values from form
if (!isset($_POST['Member_No']) OR $_POST['Member_No'] == '' OR
!isset($_POST['Surname']) OR $_POST['Surname'] == '' OR
!isset($_POST['Forename']) OR $_POST['Forename'] == '' OR
!isset($_POST['Address']) OR $_POST['Address'] == '' OR
!isset($_POST['DOB']) OR $_POST['DOB'] == '' )
// handle error and goto form script[/php]
A lot easier is to combine the form script and the form 'catcher' script so you can, whenever an error occurs, just re-display the form again with all the fields, that were filled in and valid, re-displayed in the form.
But then you'll have to show the form script code.
But this way the form is always submitted because you do the checking at the server side. If you want to do the checking before submission at the client side, you'll have to use JavaScript validation and submission.
Ronald
Hmm this is my form sorry
[HTML]<html>
<br>
<br>
<head>
<h1><font face="sans-serif, Arial" font color="white">Add Member Page!</h1>
</head>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<body background="main background1.jpg" link="blue" vlink="blue">
<table width="350" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form name="update member form" method="post" action="updatemember_ac.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="3" align="center"><strong><font face="sans-serif, Arial" font color="white">Insert Data Into mySQL Database </strong></td>
</tr>
<tr>
<td><font face="sans-serif, Arial" font color="white">Member No</td>
<td>:</td>
<td><input name="Member_No" type="int" id="Member_No" value="from below"></td>
</tr>
<tr>
<td><font face="sans-serif, Arial" font color="white">Surname</td>
<td>:</td>
<td><input name="Surname" type="varchar" id="Surname"></td>
</tr>
<tr>
<td><font face="sans-serif, Arial" font color="white">Forename</td>
<td>:</td>
<td><input name="Forename" type="varchar" id="Forename"></td>
</tr>
<tr>
<td><font face="sans-serif, Arial" font color="white">Address</td>
<td>:</td>
<td><textarea name="Address" cols="16" row="4" id="Address"></textarea></td>
</tr>
<tr>
<td><font face="sans-serif, Arial" font color="white">DOB</td>
<td>:</td>
<td><input name="DOB" type="date" id="DOB" value="YYYY-MM-DD"></td>
</tr>
<td colspan="3" align="center"><input type="submit" name="Submit" value="Finish"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br><br>
<br><br>
<table align="right" width="600" border="0" cellspacing="0" cellpadding="3" >
<tr>
<td align="center" width="30%"><b><u><font face="sans-serif, Arial" font color="white">Member No</b></u></td>
<td align="center" width="40%"><b><u><font face="sans-serif, Arial" font color="white">Membership Start Date</b></u></td>
<td align="center" width="30%"><b><u><font face="sans-serif, Arial" font color="white">Membership No</b></u></td>
</tr>
</table>
</body
</html>[/HTML]
I duno where that code should go. I think I understand what you mean though, I can only check if there was data inputted in after the submission, I really just wanted it to say sorry please fill in all fields first because it creates alot of empty spaces which aint really good for the presentation.
I really have no knowledge of javascripts so if you could provide any code, I know its a huge ask but it would be soo appreciated.
Thank you for your quick responce.