hi guys this place has been a real help for some of the problems i have encountered so i have decided to throw another problem your way
i am trying to write to an sql database but this does not update
i am using the following code, oviously replacing the passwords and user name etc
[code=php]$pass_id = md5($pass_id);
$db = mysql_connect(“hostname”, “username”,”password”);
mysql_select_db(“databaseName”,$db);
$sql = “INSERT INTO cust_profile
(name,gender,DOB,address01,address02,city,country,
post_code,email_add,phone_number,
user_id,password,card_no,card_type,expiry_date)
VALUES
(‘$name’,’$gender’,’$age’,’$add01′,’$add02′,’$city’,’$country’,
‘$post_code’,’$email’,’$phone_no’,
‘$user_id’,’$pass_id’,’$card_no’,’$card_type’,’$expiry_date’)”;
$result = mysql_query($sql);
if (!$result)
{
echo “Registration Fails..Someone has used the userID”;
exit() ;
}
echo “Registration Successful! <br /> Enjoy Your Shopping”;
exit();
}
obvously there is some thing going on becasue the data base is empty but because of the validation in this code it allwasy says please choose another id
any help would be much appreciated
thanks
scott