Page 1 of 1

select

Posted: Thu Aug 01, 2002 5:54 am
by prasadharischandra
what's wrong my coding
<?
$max=25;
$selected="";
for($second=1;$second<$max;$second++)
{
for($j=0;$j<6;$j++){
$mil=$j*10;

$time=$second.":".$mil;

if( ($time=='1:0')||($time=='2:0')||($time=="3:0")||($time=="4:0")||($time=="5:0")||($time=="6:0")||($time=="7:0")||($time=="8:0")||($time=="9:0")||($time=="10:0")||($time=="11:0")||($time=="12:0")||($time=="13:0")||
($time=="14:0")||($time=="15:0")||($time=="16:0")||($time=="17:0")||($time=="18:0")||($time=="19:0")||($time=="20:0")||($time=="21:0")||($time=="22:0")||($time=="23:0")||($time=="24:0")){

$find_real_value=$time.'0';


?>
<option value="<?echo $find_real_value; if($find_real_value==$real_time) echo "selected"?>"><?echo $find_real_value;?></option>


<?}else{
?>
<option value="<?echo $time; if($time==$real_time) echo "selected";?>" ><?echo $time;?></option>
<? }
}

}

?> :(

Posted: Thu Aug 01, 2002 5:58 am
by twigletmac
Need more than that. What are you trying to do? What isn't working? Do you get any error messages? etc. etc. You should know by now that we need more information than just 'this doesn't work fix it'.

Mac

Posted: Thu Aug 01, 2002 6:02 am
by volka
dispite I turned short tags off and $real_time is undefined it works :D

at least it produces output and no more errors or warnings

Posted: Thu Aug 01, 2002 10:51 pm
by prasadharischandra
if i add 2:00 i want to come with selected
2:00 because i want to edit
in my coding it's not happening where is the wrong and give me
right way

Posted: Fri Aug 02, 2002 12:09 am
by prasadharischandra
my coding working okkkkk i found it