RonnieBrown
asked on
Entering Dates from separate dropdowns
Hi
I'm trying to enter a date into a MySQL database using php via three dropdown lists on a web page - one for day, one for date and one for month.
I'm very much a php/mysql novice so any help much appreciated.
Thanks
I'm trying to enter a date into a MySQL database using php via three dropdown lists on a web page - one for day, one for date and one for month.
I'm very much a php/mysql novice so any help much appreciated.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks mate - that works great.
ASKER
if ((isset($HTTP_POST_VARS["M
$insertSQL = sprintf("INSERT INTO job_book (JOB_NO, `DATE`, CLIENT, JOB_DESCRIPTION, CLIENT_CONTACT, CO_CONTACT) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($HTTP_PO
GetSQLValueString($HTTP_PO
GetSQLValueString($HTTP_PO
GetSQLValueString($HTTP_PO
GetSQLValueString($HTTP_PO
GetSQLValueString($HTTP_PO
mysql_select_db($database_
$Result1 = mysql_query($insertSQL, $jobConn) or die(mysql_error());
$insertGoTo = "view.php";
if (isset($HTTP_SERVER_VARS['
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $HTTP_SERVER_VARS['QUERY_S
}
header(sprintf("Location: %s", $insertGoTo));
}
Where 'yyyy' is the value of one of the drop downs. Basically I need to replace this with a concated string consisting of "yyyy", "mm" and "dd".
Thanks