PHP Variables & HTML forms
Posted: Tue Jul 22, 2003 11:50 am
I thought this was going to be a simple problem, but its stumped me & others for days. Please, anyone, sugestions welcome...
I had a form (on a php page) with...
<td>DateOfBirth(yyyy-mm-dd)</td>
<td><input name="dateofbirth"/> ......bla bla This works...
Now i have dropdowns and a hidden field...
<td><select name="mydobday"><option>01</option>
<td><select name="mydobmth"><option>01</option>
<td><select name="mydobyr"<option>1941 </option>
<input name="dateofbirth" type="hidden" value="<?php echo $dateofbirth; ?>" />
So the question remains - how do i get the users input into variable $dateofbirth - OR how to i get the users input to be sent on in the same format as the original method.
Extra Info: globals=off.
<php $dateofbirth=$mydobyr."-".$mydobmth."-".$mydobday; ?> and
<?php $_POST['mydobyr']."-".$_POST['$mydobmth']."-".$_POST['$mydobday']; ?>
have been tried at top of page (in php block), inside the form between SELECT and INPUT, and even in the Input's VALUE=
I had a form (on a php page) with...
<td>DateOfBirth(yyyy-mm-dd)</td>
<td><input name="dateofbirth"/> ......bla bla This works...
Now i have dropdowns and a hidden field...
<td><select name="mydobday"><option>01</option>
<td><select name="mydobmth"><option>01</option>
<td><select name="mydobyr"<option>1941 </option>
<input name="dateofbirth" type="hidden" value="<?php echo $dateofbirth; ?>" />
So the question remains - how do i get the users input into variable $dateofbirth - OR how to i get the users input to be sent on in the same format as the original method.
Extra Info: globals=off.
<php $dateofbirth=$mydobyr."-".$mydobmth."-".$mydobday; ?> and
<?php $_POST['mydobyr']."-".$_POST['$mydobmth']."-".$_POST['$mydobday']; ?>
have been tried at top of page (in php block), inside the form between SELECT and INPUT, and even in the Input's VALUE=