Jump to content

form submission


ngreenwood6

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/126337-form-submission/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/126337-form-submission/#findComment-653628
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.