updating form values after submit issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
konstandinos
Forum Commoner
Posts: 68
Joined: Wed Oct 04, 2006 4:20 am

updating form values after submit issue

Post by konstandinos »

hi

i have a page (edit.php) which reads values (a row) from a database and fills in all the input fields in a form (which is used for editing the values). this page has its own submit button which just updates the values in the database. pretty standard so far.

however, editing one of the values (the image's url) is dependant on opening another separate mini-page (with no address field etc) which allows the user to select an image url from a list of options. this page's form also has a submit button.

how do i make it so that when i click on the submit button on the newly opened image-edit mini-window, the previous form is updated to reflect the image url selection made?

i assume i'll be using $_POST data, and, once ive checked which submit button called the main edit page, i then update the input fields accordingly. the issue though is that i dont know how to keep track of all the already edited data in the other input fields.

just a thought: would it be easier (or the only way even?) to make use of javascript to set the image_url input field after submitting the mini-form?

i hope i've explained the issue clearly. thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Typically it would be done via Javascript.
Post Reply