yandoo Posted June 3, 2007 Share Posted June 3, 2007 Hello there, I'm looking for a little guidance on some validation for my search form please. I have created a search form that a use inputs text to search for records in a database. The ACTION i have on the form is to hyperlink to the search results page. On this results page is where i have added the code to display the search records = to the search field. My problem is that i want to add validation so if the user doesn't input any text into the text field the page doesn't change to the results page (which would display all result in db). If message could simply appear on the Search Form page telling user to not leave text field of search form empty. Any help greatly appreciated Thank Link to comment https://forums.phpfreaks.com/topic/54097-simple-text-filed-validation/ Share on other sites More sharing options...
kathas Posted June 3, 2007 Share Posted June 3, 2007 I think JavaScript will do the trick... Example: http://www.w3schools.com/js/js_form_validation.asp Link to comment https://forums.phpfreaks.com/topic/54097-simple-text-filed-validation/#findComment-267436 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.