adding and subtracting variables are causing the coorsponding rows to be blank

I am trying to build a script to work with a secondlife project. However when I add or subtract an integer from an integer stored in the database the values revert to 0 even though the response i get from the script repeat the correct values that should be placed in the table. Here is the script below

[php]<?php
$uuid = $_POST[“uuid”];
$k = 1;
$e = 2000;
include (“connect.php”);
$result = mysql_query(“SELECT * FROM table WHERE uuid = ‘$uuid’”);
while ($line = mysql_fetch_array($result))
{
if($line[uuid] == $uuid)
{
$endurance = $line[value1] - $e;
$kills = $line[value2] + $k;
}
}
mysql_query(“UPDATE table
Set value1 = ‘$endurance’
AND value2 = ‘$kills’
WHERE uuid = ‘$uuid’”);
echo (string)$endurance. (string)$kills;
mysql_close();
?>[/php]

Any ideas on what I am doing wrong?

Sponsor our Newsletter | Privacy Policy | Terms of Service