Jump to content

[SOLVED] Date gets stored as 000-00-00


jeff5656

Recommended Posts

One of my table variabes, remove_date is in DATE format.

When I process the form below remove_date is 000-00-00, even though the if statement is true.

(When I echo remove_date it comes back as 6/27/09.)

 

 

$signoff_status = $_POST['signoff_status'];

if($signoff_status =='s'){ 
$remove_date = date ("m/d/y");

}


$sql = "UPDATE transfer SET origin = '$origin', patient = '$patient', contact = '$contact', 
mrn = '$mrn', reason = '$reason',  info = '$info', priority='$priority', remove= '$remove', 
comments='$comments', comments_date = '$comments_date', info_date='$info_date', remove_date = '$remove_date', signoff_status='$signoff_status' WHERE id_incr = '$id_incr'";


Link to comment
https://forums.phpfreaks.com/topic/163979-solved-date-gets-stored-as-000-00-00/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.