PHP Edit MySQL Field

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
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

PHP Edit MySQL Field

Post 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!
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

Post by tmaiden »

Reading up on it now; I'll let you know how I make out.

Thanks!
Post Reply