View Full Version : Date not inserting into database?!

12-11-2010, 08:00 PM

When I post a date as dd/mm/yyyy from HTML form into my date field (data type: date) it just shows as NULL?!

if(isset($_POST["register"])) {
// Your code here to handle a successful verification
$RSTOWN = $_POST["'rsTown'"];
$rsGender = $_POST['rsGender'];
$rsEmail = $_POST['rsEmail'];
$rsMobile = $_POST['rsMobile'];
$rsAge = $_POST['rsAge'];

$to = 'info@mypubspace.com, '.$rsEmail;

//define the subject of the email
$subject = 'Welcome '.$RSUSER.' to My Pub Space';

// message
$message = '

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To:' .$to. "\r\n";
$headers .= 'From:' .$rsEmail. "\r\n";

// Mail it
mail($to, $subject, $message, $headers);

$sql = "INSERT INTO members_copy (RSTOWN, RSGENDER, RSUSER, RSPASS, RSEMAIL, RSMOBILE, RSAGE) VALUES ('$rsTown', '$rsGender', '$RSUSER', '$RSPASS', '$rsEmail', '$rsMobile', '$rsAge');";
//echo $sql;

Please help?!

12-11-2010, 09:56 PM
make it varchar(30)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum