f.ismayil Posted April 19, 2011 Share Posted April 19, 2011 Imagine a form with 2 textboxes and one button. I need to check value of these texboxes and if they are not empty to send typed data into some php file. Otherwise to give user warning message that please enter the text in textboxes. I am sure it is very simple issue. I need to check the value of the textboxes inside the same php file where textboxes are located. Link to comment https://forums.phpfreaks.com/topic/234179-how-to-check-entered-text-before-submitting/ Share on other sites More sharing options...
spiderwell Posted April 19, 2011 Share Posted April 19, 2011 do you want clientside or server side validation, serverside validation will mean the form will be posted. you can use javascript to check if a form input has text in it simply enough. validation using both would make it more robust, as javascript validation can be hacked fairly easily Link to comment https://forums.phpfreaks.com/topic/234179-how-to-check-entered-text-before-submitting/#findComment-1203630 Share on other sites More sharing options...
f.ismayil Posted April 19, 2011 Author Share Posted April 19, 2011 I think client validation is enough for me. I have already server validation codes. I need to check textboxes before sending form Link to comment https://forums.phpfreaks.com/topic/234179-how-to-check-entered-text-before-submitting/#findComment-1203641 Share on other sites More sharing options...
spiderwell Posted April 19, 2011 Share Posted April 19, 2011 then you need to get this moved to the javascript section Link to comment https://forums.phpfreaks.com/topic/234179-how-to-check-entered-text-before-submitting/#findComment-1203656 Share on other sites More sharing options...
Pikachu2000 Posted April 19, 2011 Share Posted April 19, 2011 Client side validation is not enough for anyone. Validation must be performed server-side. Javascript is not validation. Link to comment https://forums.phpfreaks.com/topic/234179-how-to-check-entered-text-before-submitting/#findComment-1203676 Share on other sites More sharing options...
f.ismayil Posted April 20, 2011 Author Share Posted April 20, 2011 You are right. I just didn't know that I should use JavaScript. I will ask the same question there. Thank you very much. Link to comment https://forums.phpfreaks.com/topic/234179-how-to-check-entered-text-before-submitting/#findComment-1203850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.