PHP form validation problem?

I'm making one form using php, so validation is using PHP too,
I m posting the value in the same form and then trying to insert into mysql..look below.. I encountered the problem
--------------------------------------…
Name : Contact :
" . "alert('Enter your name')" . ""; echo ""; } else if($_POST["t2"] == "") { $err = "Enter Your Contact Number"; echo ""; } echo " $err"; } ?>
--------------------------------------…

now what problem m facing here when i click on the "Submit" button i m getting the Error messages but the page is redirecting the i have to write all values all over again ..

suppose i have already wrriten a "NAME(t1)" but didnt write a CONTACT NUMBER(t2) Новое порно: Двойное проникновение. Cмотреть онлайн, бесплатно скачать then after m clicking on the SUBMIT button when i do this my page redirecting, m getting the second error "write your contact number" but i have to write all the values like NAME etc all over again ..

so my page is returning to true .. not false .

do you know how to set "return false" through php just like we do using javascript .. i cant use javascript for this .. have to use php in this .. plz help me ..

thank you ..

Replies

You are reading an archived discussion.

Related Posts

Names of 2,000 secret Swiss account holders, including individual and Corporates form Asia, US and Britain were on Monday handed over by a former Swiss Banker to WikiLeaks for being...
We believe that we’re on the face of the Earth to make great products, and that’s not changing. We’re constantly focusing on innovating. We believe in the simple, not the...
Well, let me apologize to the*CEans outside India for writing on a India specific topic. This post is about the Common Admission Test or CAT that is conducted by Indian...
iPhone 4 sells like a hot cake just like any other Apple products. However, iPhone 4 had its own share of problems (antenna, ‘grip of death’) that put many people...
Any one know how to remove lenses from the barrels of consumer digital cameras? Specifically I have Nikon CoolPix 5700 which has condensation between the frontmost two lenses in the...