Anyone know php?

i’m passing vars from flash to php and trying to edit a mysql row from the db.

anyone know php and can spot something going awry with my code here?

 <? 

$editUser = $_POST['user'];
$newUser = $_POST['newuser'];
$newPass = $_POST['newpass'];

//this line includes the database connection variables 

$connection = mysql_connect('localhost', 'webby', 'twelve1970'); 
mysql_select_db("photogallery", $connection) 
or die('could not select table'); 

if(count($_POST) > 0) 
{ 
$query  = 'UPDATE auth SET '; 
$query .= 'username = "' . $newUser . '",'; 
$query .= 'userpassword = "' . $newPass . '" '; 
$query .= 'WHERE username = "' . $editUser . '"'; 
 
echo 'retmessage='; 
 
if(mysql_query($query,$connection)) 
{ 
echo 'User Updated'; 
} 
else 
{ 
echo 'Update Failed'; 
} 
 
} 

?>