Hey, I'm new to PHP And Ajax. I'm pretty good with SQL Though. I was wondering how I could an image, and when you click on it, run an ajax request to run a sql query
mysql_query("INSERT INTO `favorites` (`uid`, `gid`, `added`) VALUES ($member, $id, '$datetime');");
and update the image to a delete from favorites button.
using session for the user id (uid) and gid from index.php?id=13
to
http://davidknag.com/unfav.png
when clicking the unfavorite button delete that entry from sql.
I have never used ajax before and rarely used javascript.