PHP Edit MySQL Field
Posted: Tue Oct 03, 2006 8:27 am
I am not too sure on what to search for in reguards to this question so I figured I post it.
I want to display a row from a table and create a link to edit it. I would like it to be done via javascript so it doesn't have to re-post.
Example:
echo $row['field1'] & "<a href=\"editfield.php?id=" & . $row['id'] . & "\">Edit</a>";
When the edit link is clicked, I would like it to display $row['field1'] in a textarea that has a save button. When the save button is clicked, it then saves the changes via an update query back to the database.
Now forgive me if I'm wrong, I am new to this but the above example would be changed to something like this:
echo $row['field1'] & "<a href=\"javascriptFunction(" & . $row['id'] . & ")\">Edit</a>";
If anyone has a tutorial on this or know of which terms I can search on google with, please let me know.
THANKS!
I want to display a row from a table and create a link to edit it. I would like it to be done via javascript so it doesn't have to re-post.
Example:
echo $row['field1'] & "<a href=\"editfield.php?id=" & . $row['id'] . & "\">Edit</a>";
When the edit link is clicked, I would like it to display $row['field1'] in a textarea that has a save button. When the save button is clicked, it then saves the changes via an update query back to the database.
Now forgive me if I'm wrong, I am new to this but the above example would be changed to something like this:
echo $row['field1'] & "<a href=\"javascriptFunction(" & . $row['id'] . & ")\">Edit</a>";
If anyone has a tutorial on this or know of which terms I can search on google with, please let me know.
THANKS!