Link to home
Start Free TrialLog in
Avatar of JuniorBee
JuniorBeeFlag for United States of America

asked on

Using AJAX to update a record onclick of an image

I have an icon image and when i is clucked, I want to execute this function below.  Can anyone help with a very simple code example?


Thanks!
function readmessage($mid)
{
		mysql_query("UPDATE messages SET status='Read' WHERE messageid='".$mid."'");
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JuniorBee

ASKER

Hi I'm sorry, I need to do it without submitting the page (AJAX)
It's the case. We're using ajax here...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello @angelIII,

I posted valid answers : ID:28876208 and ID:28876844
The user said : Hi I'm sorry, I need to do it without submitting the page (AJAX)

The valid answers (ajax source page doing the call and the one that answer it) : ID:28876208 and ID:28876844
Thank you very much @ModEErf