Jump to content


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


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

Share this post

Link to post
Share on other sites


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.