Jump to content

PHP Form and MySql - Automatic Update


brown2005

Recommended Posts

Hi, I have been using an access database at work to store our customers records, but I am looking at updating this to php/mysql, so what I wanted to know is say I click on add form, and a customer record comes up, what I want to do is as soon as I enter details into one input box, automatically enter that into the mysql database.

 

Does anyone know of any tutorials for this?

 

Thanks

Link to comment
Share on other sites

To have it happen in real-time, that is, as you type or when you leave one field and go to another, you are going to have to use Javascript and AJAX.

 

However, unless there is some option I don't know about, Access only actually updates the record in the database when you leave the record (move to another record, or close the form). For that you would need an HTML form and an update button or next button that would POST the values and a php script to receive the values and update the database.

 

I am not familiar with any tutorials, but I'm sure there are plenty out there. Maybe someone else will suggest one. But you need to decide which approach you are going to take so you know which tutorial to start with.

 

Personally, I don't like to update the database without a specific request from the user. My daughter has a cat that likes to walk across my keyboard, and I would hate to think that my best customer's address is now "asdkj923n~afaklasd" and it is in the database and I have no way to find out what it was before ... "BAD CAT!! GET DOWN!!!

 

 

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.