Hello good pple of the forum,
I am validating my form fields using php, ok let’s say there is no text in the firstname text field, but there is text in the lastname field, when I hit the submit button, the validation text echos out that the firstname text field is empty and then displays the again (which is index.php). But the is my previous text in the lastname text field disappears. Pls how can I overcome this?
Thank you.
PHP Code:if((!$first)||(!$last)||(!$email)||(!$edu)||($_FILES['resume']['type']!='application/msword'))
{
echo 'you did not submit the following info<br/>';
if(!$first)
{
echo 'first name is a required field<br/>';
}
if(!$last)
{
echo 'last name is a required field<br/>';
}
if(!$email)
{
echo 'email is a required field<br/>';
}
if(!$edu)
{
echo 'highest qualificaiton is a required field<br/>';
}
if($_FILES['resume']['type']!='application/msword')
{
echo ' make sure the file type is a Microsoft Word document<br/>';
}
include 'index.php';
exit();
}




Bookmarks