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