Jump to content

[SOLVED] Inputing a date into MSQL from a post form


NewbieBryan

Recommended Posts

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");

 

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.

 

 

Archived

This topic is now archived and is closed to further replies.

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