Jump to content

Inserting the Date


Recommended Posts

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!!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.