Your MySQL query is incorrectly formatted. The or die
should be after the query.
mysql_query("UPDATE people SET first_name = '$fname' , last_name = $lname , email = $email , age = $age , cityids = $city , gender = $gender WHERE id = $Recedit") or die (mysql_error);
But also, for readability, I recommend you do something like this:
$query = "UPDATE people SET"
. " first_name = '" . $fname . "',"
. " last_name = " . $lname . ","
. " email = " . $email . ","
. " age = " . $age . ","
. " cityids = " . $city . ","
. " gender = " . $gender
. " WHERE id = " . $Recedit;
mysql_query($query) or die (mysql_error);
Formatting queries so they are human readable always helps you in the log run when debugging logic & formatting errors.