Hi, i tried the RAJARAJAN advice and all the variables echoed correctly, the WHITEYO advice returns me error... so i tried sending the mysql_error to get the kind of error, and then this happens whit the next code...
<?php
mysql_connect("$host", "$mysql_user", "$mysql_pass")or die("Error connecting.");
mysql_select_db(users)or die("Error connecting to database.");
$sql = 'UPDATE members SET username="'.$username.'", email="'.$email.'", name="'.$name.'", fullname="'.$fullname.'", sex="'.$sex.'", phone="'.$phone.'", mobile="'.$mobile.'", phone2="'.$phone2.'", country="'.$country.'", state="'.$state.'", postalcode="'.$postalcode.'", WHERE id="'.$id.'"';
if (mysql_query($sql)) {
echo 'Update done!';
} else {
print (mysql_error());
}
mysql_close();
?>
The last code returns me the next error:
" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id="74"' at line 1 ".
I tried looking up at the error and change the code for:
<?php
mysql_connect("$host", "$mysql_user", "$mysql_pass")or die("Error connecting.");
mysql_select_db(users)or die("Error connecting to database.");
$sql = 'PDATE members SET username="'.$username.'", email="'.$email.'", name="'.$name.'", fullname="'.$fullname.'", sex="'.$sex.'", phone="'.$phone.'", mobile="'.$mobile.'", phone2="'.$phone2.'", country="'.$country.'", state="'.$state.'", postalcode="'.$postalcode.'", WHERE id="'.$id.'"';
if (mysql_query($sql)) {
echo 'Update done!';
} else {
print (mysql_error());
}
mysql_close();
?>
This only changed 'UPDATE' for 'PDATE', and returns me the next error:
" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PDATE members SET username="someusername", email="someemail", name="somename", ful' at line 1 "
The html form looks like this:
AT ALL IT KEEPS ME RETURNING ME ERROR... IM GETTING STUCKED IN HERE! HELP ME PLEASE!