ngreenwood6 Posted September 29, 2008 Share Posted September 29, 2008 Hello all, I have created a text box without a submit button in html. I have a database that I am connecting to. When a user types something into this text box I want it to the check to see if that information is in the database. Does anyone know how I can accomplish this? I do not know a whole lot of javascript but from my understanding php is processed before javascript. An example or tutorial would be great and I can build it from there. Thanks for any help in advance Quote Link to comment Share on other sites More sharing options...
Flames Posted September 29, 2008 Share Posted September 29, 2008 i'd also like to be able to do this, to check a database to see if a username exists when registering Quote Link to comment Share on other sites More sharing options...
xtopolis Posted September 30, 2008 Share Posted September 30, 2008 I don't understand your purpose of not having a submit button? In a simple form, you input data, data is passed to the server, php can process it, and then it is validated and processed (returned to fix errors, stored in a database, etc) It seems like you want to do this step without submitting the form.. which would be done using AJAX. I can't cover AJAX here, it's fairly broad. Do a simple AJAX search in google, and you'll find examples... The logic process is: 1)User enters data in the form 2)Javascript pulls the data from any of the form fields 3)It creates a request in the background (the commonly misnamed "ajax" part) 4)PHP processes what you send it, and outputs a result 5)Javascript receives the result, and you setup a handler for it Quote Link to comment 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.