Do you have this code in your dbinfo.inc.php page:
mysql_connect('localhost', 'username', 'password', 'databasename') or die(mysql_error());
Your username and password should be the same as your FTP login. Your database name you should know.
You need to change the image paths to whatever image you need to display.
then if you want to display your vote counts you need to change your vote.php page to this:
<?
//connect to db with remote file
include('dbinfo.inc.php');
//end connect to db
if($image='image1'){
mysql_query("INSERT INTO tablename (image) VALUES ('$image')") or die(mysql_error());
$query = "SELECT * FROM tablename WHERE image='$image'";
$num = mysql_num_rows($query);
echo " You vote for $image . It has been voted for $num times!";
} else {
$image = 'image2';
mysql_query("INSERT INTO tablename (image) VALUES ('$image')") or die(mysql_error());
$query = "SELECT * FROM tablename WHERE image='$image'";
$num = mysql_num_rows($query);
echo " You vote for $image . It has been voted for $num times!";
}
?>
You should know the name of your table as well and should change that accordingly in the mysql_query's. Hope this helps.