Hi All,
Can anybody see why this code wouldnt update the database?
Cheers
Paul
$me = $_SESSION['user_id'];
$user_title = $_POST['user_title'];
$user_fname = $_POST['user_fname'];
$user_lname = $_POST['user_lname'];
$user_add1 = $_POST['user_add1'];
$user_add2 = $_POST['user_add2'];
$user_city_state = $_POST['user_city_state'];
$user_post_zip = $_POST['user_post_zip'];
$user_email = $_POST['user_email'];
$user_password = $_POST['user_password'];
// Connect to server and select databse.
$conn = mysql_connect("localhost", "un", "pw")or die("cannot connect");
mysql_select_db("db", $conn);
$sql = "UPDATE tbl_user SET user_title = '$user_title',user_fname = '$user_fname',user_lname = '$user_lname',user_add1 = '$user_add1',user_add2 = '$user_add2',user_city_state = '$user_city_state',user_post_zip = '$user_post_zip',user_email = '$user_email',user_password = '$user_password', WHERE user_id = $me";
$result = mysql_query($sql);
echo "thanks";