hi, total noob to php.
i'm passing in vars from flash and using them to determine a row to edit.
for some reason I'm getting stuck. i'm sure it's something simple but i'm still learning php!
any help would be great!
<?
$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';
}
}
?>
at this point the php page doesn't return anything (when i hardcode in the POST vars). i'm at a loss here!