xanie Posted January 15, 2013 Share Posted January 15, 2013 i couldn't find any errors on it.. <?php include ("../config/db.php"); $first = $_POST['first_name']; $last = $_POST['last_name']; $add = $_POST['address']; $age = $_POST['age']; $gender = $_POST['gender']; $contact = $_POST['contact_num']; $email = $_POST['email_add']; $pass = $_POST['password']; $month = $_POST['Month']; $day = $_POST['Day']; $year = $_POST['Year']; $birthdate = "$month $day, $year"; $full = "$first $last"; #############---------INSERT DATA-------############ mysql_query ("INSERT INTO register( first_name, last_name, address, age, gender, birthday, contact_num, email_add, password ) VALUES( '$first', '$last', '$add', '$age', '$gender', '$birthdate' '$contact' '$email', '$pass' )")or die(mysql_error()); ##########------------SEND MAIL----------------############ $message= "$first <br /> $last <br /> $pass <p>Your email address will serve as your username.</p> <p>Thank You!</p>"; echo"$message"; $send_to= $email; $subject= "Register"; $headers .= 'From: '.$email.'' . "\r\n"; $headers .= "Reply-To: [email]mail@genasiabiotech.com[/email]\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers .= "Content-Transfer-Encoding: 8bit;\r\n\r\n"; $headers .= stripslashes($input); $headers .= "\r\n"; mail($email,$subject,$message,$headers); ?> Quote Link to comment Share on other sites More sharing options...
Barand Posted January 15, 2013 Share Posted January 15, 2013 (edited) $birthdate = "$month $day, $year"; You are getting the error because your date contains a comma you have commas missing after date and contact values If you are storing dates in a DB table use the DATE or DATETIME types and the format is YYYY-MM-DD. Your current format is useless in a database other than for printing. You cannot do any sorting or date comparisons or easily use any of the dozens of date functions the mysql provides. Edited January 15, 2013 by Barand Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.