Quote:
Originally Posted by sarettah
Easy enough to make it display height as feet in the select box. However, unless you are going to change the program that is handling the form to handle it as feet , you want to keep what is passed into the program as inches still.
|
thanks for your help yes that is what I am trying to do is make it display in feet in the profile page
the code for the people to add their profile to the site is
<label>Height:</label>
<select name="height" class="search_input">
<option value="">--select--</option>
<? for($i=58;$i<=73;$i++) {
?>
<option value="<?=$i;?>" <? if($rs['height']==$i) { echo "selected"; }?>>
<?=$i;?>
</option>
<? } ?>
</select>
and the code on the actual profile page visible to public is
<p>Height:
<?=$detail['height'];?>
how do i make that ^ display as feet? Thanks!
edit it used your code as this on the create profile page and it changed it to feet now to get the profile to display in feet thanks!
<label>Height:</label>
<select name="height" class="search_input">
<option value="">--select--</option>
<? for($i=58;$i<=73;$i++) {
?>
<option value="<?=$i;?>" <? if($rs['height']==$i) { echo "selected"; }?>>
<?=intval($i/12) . ' feet ' . ($i-(intval($i/12)*12)) . ' inches';?>
</option>