I have a form that asks a user to insert a specific date. The MySQL field type is the regular date (0000-00-00) and below a part of the date form code:
<td width="30%"><input type="text" name="dia" value="<?php echo $dia ?>" size="1">
<input type="text" name="mes" value="<?php echo $mes ?>" size="1">
<input type="text" name="ano" value="<?php echo $ano ?>" size="3"></td>
<?php
$data='"$ano"-"$mes"-"dia"';
echo "$data";
?>
What I wanted to do is have three input boxes, one for day, month and year (in the brazilian order d/m/y). Then the input from these three boxes would be organized in the MySQL order and submitted to the database.
Well, it didn't work hehe, and this whole date thing really is confusing me... could anyone shed some light here?
thanks,
greg