brown2005 Posted July 23, 2010 Share Posted July 23, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/208668-php-form-and-mysql-automatic-update/ Share on other sites More sharing options...
DavidAM Posted July 23, 2010 Share Posted July 23, 2010 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!!! Quote Link to comment https://forums.phpfreaks.com/topic/208668-php-form-and-mysql-automatic-update/#findComment-1090177 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.