Jump to content


Inserting the Date

  • Please log in to reply
No replies to this topic

#1 casey5

  • Members
  • Pip
  • Newbie
  • 1 posts

Posted 25 July 2005 - 04:32 PM

Can anyone help??? I am trying to create a form that uploads to the database. When you type in the info I have everthing working but I want to be able to enter the date by m/d/y? I am pulling my hair out. Please see part of the code... What am I doing wrong?? SHould it go somewhere else in the code. If so, where?

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "AddOrder")) {
$insertSQL = sprintf("INSERT INTO orders (UserID, OrderTitle, StationName, MarketName, StartDate, EndDate, name) VALUES (%s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['CompanyName'], "int"),
GetSQLValueString($_POST['OrderTitle'], "text"),
GetSQLValueString($_POST['StationName'], "text"),
GetSQLValueString($_POST['MarketName'], "text"),
GetSQLValueString($_POST['StartDate'], "date = %c%d%Y"),
GetSQLValueString($_POST['EndDate'], "date"),
GetSQLValueString($_FILES['filetoupload']['name'], "text"));

Thanks in advance!!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users