Jump to content

date strings to mysql


itgranny

Recommended Posts

I'm sure the answer to this is out there but I have no idea what to call it. I've been googling most of the day trying to figure out different solutions.

 

I have a supervisor visit form where I had been just time stamping with the current date. There's been times when the supervisor doesn't fill it out until the next day and I've got to figure out how to put a date in. It doesn't need to be a date that needs to be worked with I just want it to get put into the mysql table in anyway I can get it.

 

What I've done is I've set up some dropdown forms they can put the date in. Now I'm trying to get the database to update. When I echo $visitDate, it displays it properly but it won't insert it correctly into the database. I've tried all sorts of things but none work. - seems to make it subtract, / makes it divide. I've tried making the mysql visitDate text and varchar but it still does math.

$visitDate=$_POST[month] . "/" . $_POST[day] . "/" . $_POST[year];

 

Can someone spot what I'm doing wrong? thanks!

Link to comment
https://forums.phpfreaks.com/topic/286181-date-strings-to-mysql/
Share on other sites

Archived

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

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