Rajatapaus Posted March 15, 2012 Share Posted March 15, 2012 I have a text box and a submit button. I want that when the submit button is pressed, the value on the text box will be checked if it matches the values that are on my server before proceeding, and if they don't match it should give an error report and stop. All I can make myself is the text box and the submit button, I have tried for hours to find a way to do the rest, but all I can find on the internet are vague explanations and information that a novice like me cannot use. It would be a shame to let me web site that I have worked hard on to go to waste because I cannot do this myself Thank you in advance Quote Link to comment https://forums.phpfreaks.com/topic/259015-server-side-validation/ Share on other sites More sharing options...
batwimp Posted March 15, 2012 Share Posted March 15, 2012 Post what code you have so far. Remember to put it inside CODE tags. Quote Link to comment https://forums.phpfreaks.com/topic/259015-server-side-validation/#findComment-1327857 Share on other sites More sharing options...
Psycho Posted March 15, 2012 Share Posted March 15, 2012 if($_POST['name_of_text_field'] != 'validation_value') { echo "Wrong value!"; exit(); } //Correct value, proceed Quote Link to comment https://forums.phpfreaks.com/topic/259015-server-side-validation/#findComment-1327859 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.