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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.