הקטע הבא אמור לשלוף מספר להוסיף אחד ולהכניס חזרה:
PHP קוד:
<?
require('config.php');
if ($_GET['id']) {
$cod=$_GET['id'];
$som = mysql_query("SELECT * FROM `reg` WHERE `idshin`='$cod' ORDER BY `votes` DESC") or die (mysql_error());
$rec=mysql_fetch_array($som);
$vv=$rec['votes'];
$vov=$vv+1;
mysql_query("UPDATE `reg` SET `votes` = $vv WHERE `idshin`=$cod") or die (mysql_error());
?>
<html>
<head>
<title>äöáòä</title>
<meta http-equiv="Content-Language" content="he" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
K
</center>
</body>
</html>
<?
} else {
echo "NOT K";
}
?>
לא מראה אף שגיאה אבל משום זה לא עובד
כאילו הוא לא מעדכן באחד