fluvius Posted November 1, 2008 Share Posted November 1, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/130996-date-field-not-working-correctly/ Share on other sites More sharing options...
Flames Posted November 1, 2008 Share Posted November 1, 2008 we need your code to do it but its probably a simple mistake not using the drop down values and instead using todays date by date function or similar Quote Link to comment https://forums.phpfreaks.com/topic/130996-date-field-not-working-correctly/#findComment-680055 Share on other sites More sharing options...
alexweber15 Posted November 1, 2008 Share Posted November 1, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/130996-date-field-not-working-correctly/#findComment-680262 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.