Click here to Skip to main content
16,012,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I validate data that entered from a form and using the data in MySQL?
Posted
Comments
[no name] 28-Jun-11 5:09am    
please explain your scenario
Uday P.Singh 1-Jul-11 11:46am    
do want to match the data given by a user in a form with your database data?

1 solution

About validating data entered from the form it will depend on the type of data whether it is a date, a string , an integer etc. You can check to see if the field is empty.
e.g
if your form is submitted using post and filed name is "Fname",
then
if($_POST['Fname'] == " ") echo "Fname field cannot be empty";
?>


Hope this helps
 
Share this answer
 
Comments
Chiranthaka Sampath 6-Jul-11 2:05am    
Thanks pal I really want that code hint!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900