aniket_dj Posted March 15, 2007 Share Posted March 15, 2007 Hi, I am new to this forum as i am new to PHP in general. So a general hello to all folks in here. Basically what I am doing is getting tuples from database (MySQL) and putting them in a table using PHP+HTML. After the whole table is displayed, I want the user to add another row to the database by having an add key. The add key, adds a new row (with a the same number of fields as the previous tuple). After hitting the submit button, the changes should be reflected back into the database. As far as I know (for a novice to web programming in general), I can have a single submit button which submits the form contents to the server. As this is an update webpage operation, rather than a submit op, how do I go about it? Thanks. ~Aniket. Quote Link to comment https://forums.phpfreaks.com/topic/42922-solved-add-new-fieldsrows-button-to-a-webpage/ Share on other sites More sharing options...
peeps Posted March 16, 2007 Share Posted March 16, 2007 Could you post the code so it would be easier to help you. But if you just do a button like this <input type="submit" value="Send"> the page should automatically update itself as long as you take the values in the form fields (they will be in $_POST) and add them to the data base so when the loop runs and prints out the table it will add the last entry. Quote Link to comment https://forums.phpfreaks.com/topic/42922-solved-add-new-fieldsrows-button-to-a-webpage/#findComment-208525 Share on other sites More sharing options...
aniket_dj Posted March 16, 2007 Author Share Posted March 16, 2007 yeah.... got this sorted out.... Thanks a lot for helping me out. ~Aniket. Quote Link to comment https://forums.phpfreaks.com/topic/42922-solved-add-new-fieldsrows-button-to-a-webpage/#findComment-208530 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.