Problems inserting info into database<

windows

Guest
I'm working on a membership script for my site, but for some reason it doesn't insert the info into the MySQL database. Here's the end of the script I have:
if (mail($email,$subject,$message,$headers)) // if mail is successful
{
// Store data into database
$q = "insert into membership (id, name, email, password, status, code, createDate, aim, msn, yim, icq, gender, bmonth, bday, byear, webName, webURL, icon, about, exclusive) VALUES ('','$name','$email', '$password', 'N','$code', now(), '$aim'; '$msn', '$yim', '$icq', '$gender', '$bmonth', '$bday', '$byear', '$webName', '$webURL', '$icon', '$about', '$exclusive' )";
$rs = mysql_query($q);

if ($rs)
{
echo "<p>Thank you $name. An email has been send to $email with the activation code to activate your account.</p>";
}
Any ideas on why it's not working?change this line
$rs = mysql_query($q);
to this
$rs = mysql_query($q) or die(mysql_error());Got it! I had a semi colon where i was supposed to have a comma but it works now. Thanks a bunch!Ah, yes, I see it now; missed it at first glance.
'$aim';
 
Back
Top