Forum Moderators: coopster
for instance, right now i have that you have to at least search by "last name", but i want to be able to say that "you must enter data into at least one search criterion"
and have the form validate that at least one, doesnt matter which field...has data entered into the field...
current script:_____________________________________________
if (isset($_POST['submit'])) {
if (!$_POST['lname'])
{
echo'<table>
<tr>
<td><h3>You must enter a last name to query data</h3></td>
</tr>
</table>';
}
You can search by First Name or Last Name. Right now i have it so that you must at least query by Last Name. I am going to add 30 more fields for users to query records..
I want them to at least enter data into one field to query the database, but i dont care what field it is....just one.
if they dont, error...if they do, it displays the records...
i already have the rest of the script done, but i want to change this area of validation from validating one field of last name, to validating that at least one field has data...and again, it doesnt matter what field...
hope i clarified that...
thanks