about2flip
Technical User
Hi:
I am trying to write a date selected by the user into mysql date column. There are three variables month, day, year.
Here is portion of the code from the script that will insert the data into the DB:
Someone on this forum told me that I could do $_POST[month:day:year]' but that did not work. I also tried commas too.
I am also trying to echo the results using:
I'm only showing month, day because I was doing some test.
Any help is greatly appreciated. THANKS!!!
I am trying to write a date selected by the user into mysql date column. There are three variables month, day, year.
Here is portion of the code from the script that will insert the data into the DB:
Code:
/ create query
$query = "INSERT INTO $table_name (shipperorg, pickupdate, origincity, originstate, destcity, deststate, loadtype, equiptype, weight, miles) VALUES ('$_POST[shipperorg]', '$_POST[month,day]', '$_POST[origincity]', '$_POST[originstate]', '$_POST[destcity]', '$_POST[deststate]', '$_POST[loadtype]', '$_POST[equiptype]', '$_POST[weight]', '$_POST[miles]')";
Someone on this forum told me that I could do $_POST[month:day:year]' but that did not work. I also tried commas too.
I am also trying to echo the results using:
Code:
<td><strong>Pick Date: </strong></td>
<td><? echo "$_POST[month,day]"; ?></td>
I'm only showing month, day because I was doing some test.
Any help is greatly appreciated. THANKS!!!