Jump to content

Recommended Posts

Hi

 

Think a bit more detail is required.

 

Do you want just a single text field to enter the date manually? Do you want to try and recognise different date formats? Do you want a popup div for the user to select the date from?

 

The actual MySQL bit is easy (just put it in the appropriate format in your INSERT / UPDATE statement). However the rest would probably be best aimed at a php or Javascript area of the forum.

 

All the best

 

Keith

I have a Date field in my database and a text field that will insert the date in to the database. it will pick a date from a pop up window... and insert that selected date into the MySQL.

 

just wondering if someone can guide me on achieving this... thanks!

Hi

 

For a normal form then have your php script receive the values and do any validation (including of the date field). If you are happy with it then do the insert.

 

Normal SQL insert would be something like:-

 

INSERT INTO atable (somefield, anotherfield, datefield) VALUES ('somevalue','anothervalue','2010-01-02')

 

The difficult bit for you is the popup and the Javascript. Probably best to post that in the Javascript forum.

 

All the best

 

Keith

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.