Though there's a problem that keeps bugging me. The following code doesn't work:
Code: Select all
while ($row = mysql_fetch_array($numrows))
{
echo "Before action: ".$row[ja];
$ja = $row[ja];
}
$voted = $_POST[voted]; #<- tried it with and without this function
if ($voted == 1)
{
$ja++;
$add = mysql_query ("UPDATE telenamen SET ja = $ja WHERE id = 00001");
echo "<BR> After Action: ".$ja;
if (!add) { echo "Failure"; }
}It doesn't do anything this way, but when I put it like this it works:
Code: Select all
while ($row = mysql_fetch_array($numrows))
{
echo "Before action: ".$row[ja];
$ja = $row[ja];
}
$voted = $_POST[voted];
$voted = 1; # <- I've add this one...
if ($voted == 1)
{
$ja++;
$add = mysql_query ("UPDATE telenamen SET ja = $ja WHERE id = 00001");
echo "<BR> After Action: ".$ja;
if (!add) { echo "Failure"; }
}Thank you very much in advance,
Ferdi