Sometimes, to make things easier for the user , I want to break up an entry into a couple of input fields but the administrator needs the information as one database entry.
For example the administrator wants one database entry for Birth_Date but on the form I want to break it up into month/day/year.
Here is the code I used on the form
I added Birth_Date to the database and I have tried using to the following code in the form code, in the On Submit code or as extra code but I can't get any full entries under Birth_Date in the database table. The best I can do is get the strings //
Any advice would be useful.
Thanks in advance.
For example the administrator wants one database entry for Birth_Date but on the form I want to break it up into month/day/year.
Here is the code I used on the form
<div class="cf_item">
<h3 class="cf_title">Birth Date</h3>
<div class="cf_fields">
<table cellspacing="0" cellpadding="0" width="12em" title="" class="multi_container">
<tbody width="100%">
<tr width="100%">
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="cf_item">
<h3 class="cf_title" style="width: 30px;">mm</h3>
<div class="cf_fields">
<input name="b_date_m" type="text" value="" title="" class="cf_inputtext cf_inputbox validate-number" maxlength="2" size="2" id="text_3" />
<br />
<label class="cf_botLabel"></label>
</div>
</div>
</td>
<td style="width: auto; vertical-align:bottom; text-align: center;">
<div class="cf_item"> <span class="cf_text">/</span> </div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="cf_item">
<h3 class="cf_title" style="width: 30px;">dd</h3>
<div class="cf_fields">
<input name="b_date_d" type="text" value="" title="" class="cf_inputtext cf_inputbox validate-number" maxlength="2" size="2" id="text_4" />
<br />
<label class="cf_botLabel"></label>
</div>
</div>
</td>
<td style="width: auto; vertical-align:bottom; text-align: center;">
<div class="cf_item"> <span class="cf_text">/</span> </div>
</td>
<td style="width: auto; vertical-align: middle; text-align:center;">
<div class="cf_item">
<h3 class="cf_title" style="width: 50px;">yyyy</h3>
<div class="cf_fields">
<input name="b_date_y" type="text" value="" title="" class="cf_inputtext cf_inputbox validate-number" maxlength="4" size="4" id="text_2" />
<br />
<label class="cf_botLabel"></label>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cfclear"> </div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_1" type="submit" />
</div>
<div class="cfclear"> </div>
</div>
I added Birth_Date to the database and I have tried using to the following code in the form code, in the On Submit code or as extra code but I can't get any full entries under Birth_Date in the database table. The best I can do is get the strings //
<?php
$Birth_Date = "$b_date_m" ."/". $_POST["b_date_d"] ."/". $_POST["b_date_y"]
?>
<input value="<?php
echo $Birth_Date
?>" id="hidden_0" name="Birth_Date" type="hidden" />
Any advice would be useful.
Thanks in advance.