Thanks!
Main Topics
Browse All Topicshi EE,
I have a result from mysql in rows where each row contains info about a page, built by my CMS, like so:
row: | pagetitle | pagealias | pagestatus |
i want to create a form to update these values for all pages, so the form would have rows like the one above, and fields per row to edit those fields per record. pagetitle would appear per row in a text field, for example.
i want to send this form with so many rows to a script that will take all info from the form and update each record with the info from the corresponding row.
any suggestions? (i'm sure one way to go would be to use a hidden field per row with the value of the pageID, but after that i'm not so sure.)
thanks,
brad
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
No comment has been added to this question in more than 21 days,so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
[Accept matt_mcswain 's comment]
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
Kshitij Ahuja
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: matt_mcswainPosted on 2005-01-27 at 00:32:15ID: 13150364
Is this the same question?
th>PageTit le</th><th >PageAlias </th><th>P ageStatus< /th></tr>' ; MYSQL_ASSO C)) { _arr['page id'].']" value="'.$currentvalue.'"> </td>' : '';
One question for the form, and one to process it?
I suppose that's OK
Anyway, as I said it the other question, I would use html arrays to build the form, if your just updating all rows.
So try:
$result = mysql_query("SELECT * FROM pages") or die(mysql_error());
echo '<form method="POST"><table><tr><
while($result_arr = mysql_fetch_array($result,
echo '<tr>';
foreach($result_arr as $field=>$currentvalue)
echo $field != 'pageid' ? '<td><input type="text" name="'.$field.'['.$result
echo '</tr>';
}
echo '</table><input type="submit" value="Submit"></form>';
To display your form w/ the current values