Hey
Ik ben een kleine vote counter aan het maken voor mijn site. op een of andere reden wil hij niet werken.
ik krijg geen foutmeldingen meer in it maar hij laat de teller wel steeds op 0 staan.
frond:
afhandeler.
kan iemand ff meekijken wat ik fout doe?
Ik ben een kleine vote counter aan het maken voor mijn site. op een of andere reden wil hij niet werken.
ik krijg geen foutmeldingen meer in it maar hij laat de teller wel steeds op 0 staan.
frond:
PHP:
<html>
<head><title>vote test</title></head>
<body>
<form action="test_vote_end.php" method="POST">
<b>Username</b><br>
<input type="text" name="uservote" size=40>
<p><input type="submit" value=" Vote ">
</form>
</body>
</html>
afhandeler.
PHP:
<?php
//make a connection
$connection = mysql_connect("localhost","root" ,"XXXXX")
or die ("Cannot make that connection");
//connect to our database
$Vote = $HTTP_POST_VARS['uservote'];
$db = mysql_selectdb("realmd_test" , $connection);
//store the result of the query in $result
$result = mysql_query("SELECT * FROM account");
//retrieve the fields in our table
$fields = mysql_fetch_row($result);
//update the count field by 1
mysql_query("UPDATE account SET vote_points='vote_points+1' WHERE username='$vote'");
//$mycount variable is set to the first field (count)
$mycount = $fields[0];
//display the count
echo $mycount;
?>
kan iemand ff meekijken wat ik fout doe?