NewbieBryan Posted July 8, 2009 Share Posted July 8, 2009 I have created a form that captures a couple of fields: Name; Description; Date The Database structure allows VARCHAR for the Name; DEscrip; etc and I have set the Date in the table to DATE The problem is that when I capture data from the form; all the VARCHAR fields are correctly completed but the Date field remains empty. I have tried a couple of sequences (20090708 and 2009-07-08 and 2009/07/08) I suspect this may have to do with the input type on the form itself : DateAdded :<input type="text" name="DateAdded" /> <P> DateDue :<input type="text" name="DateDue" /> <P> Is there a "date" type? Am I on the right track here with my logic? ADDED LATER: (Aplogies - Just read the requirements) Server version: 5.0.32-Debian_7etch10-log Query $result = mysql_query("SELECT * FROM todo"); Quote Link to comment https://forums.phpfreaks.com/topic/165258-solved-inputing-a-date-into-msql-from-a-post-form/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 8, 2009 Share Posted July 8, 2009 Code for receiving it from the form and forming the query? And what type of database server is it? Your title is MSQL, you have posted in the MySQL help forum? Quote Link to comment https://forums.phpfreaks.com/topic/165258-solved-inputing-a-date-into-msql-from-a-post-form/#findComment-871521 Share on other sites More sharing options...
NewbieBryan Posted July 8, 2009 Author Share Posted July 8, 2009 Hi PFMaBiSmAd, Apologies if this is the incorrect section (still finding my feet around here) - If so, please point me in the right direction. Following on the initial post: Long and short is that I am posing data from a PHPform into a MySQL Db (ver5.x) My table fields are formated as either VARCHAR or DATE The problem is that when posting from the form it appears as if only the VARCHAR fields are populated (although there are values submitted for the DATE fields as well) when doing a query on the Db There are no errors displayed on posting whatsoever so I am at a loss. Quote Link to comment https://forums.phpfreaks.com/topic/165258-solved-inputing-a-date-into-msql-from-a-post-form/#findComment-871529 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.