Hey there. I'm building a project in PHP/MySQL and it is a sort of FaceMash project. I am able to call the images (with image name and points) from the database. I have managed to use the MySQL Update query in order to increase the points that each image gets when clicked but it just applies this to every image in the database. I cannot work out how to use the WHERE part of the update query that gives the point to that specific image that was clicked.
I have it set up as follows:
rate.php (the main page) *Click on an image* --> update.php (Which contains the update query)
The query I currently have is:
<?php
include_once("connect.php");
include_once("rate.php");
$con=mysqli_connect("10.168.1.49","danielaf_adam","adamchip22","danielaf_adam");
mysqli_query($con,"UPDATE teachers SET points= points+1 WHERE row='$row'");
?>
Some help would be really appreciated as I have been pondering on this one for ages. Cheers.