Page 1 of 1

PHP Edit MySQL Field

Posted: Tue Oct 03, 2006 8:27 am
by tmaiden
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!

Posted: Tue Oct 03, 2006 8:30 am
by JayBird
This google search will show you what you are looking for

- http://www.google.com/search?q=ajax+edit+text

or

- http://www.google.com/search?hl=en&lr=& ... tnG=Search

Posted: Tue Oct 03, 2006 11:14 am
by tmaiden
Reading up on it now; I'll let you know how I make out.

Thanks!