LeMen Posted November 16, 2013 Share Posted November 16, 2013 Hello. I need little help here, since I am newbie on PHP and MySQL. ^^ I have form input, one is design to auto increment and the other is purpose to retrieve the information from database. How I do that ? Here the detail: 1. There is auto increment information base from the last database input and add the number with 1. So, if the last is 0, then it should displaying 1, and so on. Its purpose just for showing the information of the number, not for manual input. At the moment, I still put it on manual since I don't know how to code it. 2. There's some drop down choice, like <option> menus and/or <datalist>, and the data which is manually input, have some other value store already in database, like; if name is "John" it has other value like "address" or "age". I want to display those information during selection was made. This on the same form input. So, like it's showing other detail on specific place about the related selection which has been made. Pardon my english, since its not my primary language. Thank you before. Quote Link to comment Share on other sites More sharing options...
dalecosp Posted November 16, 2013 Share Posted November 16, 2013 Your English is pardoned ... but I'm (unforunately) not quite clear on what you want.It sounds like you want to update the form page with data from the server without submitting the form. This requires AJAX (Asynchronous Javascript And XML) and is something of an advanced topic (and not much about PHP). Quote Link to comment Share on other sites More sharing options...
LeMen Posted November 16, 2013 Author Share Posted November 16, 2013 Ahh, I see. I guess that what I want. I want to 'update' the data form on certain selection by retrieving some information on the database. That's mean I post this on wrong sub forum, right? Do I need to make the new thread under Ajax help? Not sure if Moderator could move this one rather than create a new one. Thanks for enlighment, dalecosp. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted November 16, 2013 Share Posted November 16, 2013 (edited) actually, you would want to make sure you can produce the code to do this at all, before you make the jump to using ajax to do it without refreshing the page. the task you are attempting is fairly common and even has an acronym - CRUD (Create, Read, Update, Delete.) your goals are to be able to create new records and insert them and to display the existing records with a way of updating or deleting them. when you select the update operation, the existing values are retrieved and populate the form. when you submit the form, the values are used to update the record. Edited November 16, 2013 by mac_gyver 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.