Jump to content

Date field not working correctly


fluvius

Recommended Posts

Hi all,

 

I am no PHP expert, hardly even a novice, and I am experiencing a problem with a website that I had a hand in developing way back in 2002/3. Unfortunately I wasn't the coder on the project and that coder has now moved on.

 

I am in the process of moving a website that promotes the services of a concrete dam engineering company and allows visitors to search their database of dam projects.

I will then carry out a full visual redesign of the site to the latest web standards.

The temporary address of the site is http://79.170.40.226/rccdams.co.uk/welcome.htm

 

Since the files causing the problem are used to administrate the site, they are normally password protected, but I have removed that in order to allow anyone wishing to help me with this problem to access them.

 

The problem lies within the news administration section: http://79.170.40.226/rccdams.co.uk/administration/admin_news.php

 

If you create a new news story using the link on the page, entering a date in the dropdown field either in the future or past, the date shown for that story is today's, regardless of what you entered.

 

If you then click on the Edit link for the news story just created and select a different date, when saved the date is now altered to what you selected.

 

Clearly the admin_news_edit.php page is handling the date entered correctly and saving it to the news table, but the admin_news_add.php file isn't.

 

I've had a look through both files but failed to see what could be causing the problem.

 

I'd be very grateful to anyone who could offer any suggestions.

 

Thanks in advance,

Tony.

Link to comment
Share on other sites

again without the code we're limited to guessing, but probably something do with the way your script and MySQL represent dates (MySQL is yyyy-mm-dd) and most people do (dd-mm-yyyy) so maybe its just not recognizing the date you give it as valid and filling in a default value (which happens to be the current date?

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.