hi,
i got printing problem in new line between PHP and javascript
php stuff i can print but how i can use javascript in between if and else as clock is javascript code and time field is php
<td nowrap>
//
<input type=”text” class=”button” size=”1″ name=”clock”>
<select name=”time” size=”1″ >
<option selected value=”<?=date(‘H:i’)?>”><? echo (date(‘H:i’)); ?></option>
<option value=”08:00″></option>
<option value=”09:00″></option
<option value=”10:00″></option
</select>
</td>
//get the time from table
$query = “SELECT time FROM t_emp ;
$result = mysql_query($query) or die(“Query failed: Fetch all rows”);
<? while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { ?>
//printing
<td>
<? if ($_POST[“time”] != “clock”) {?>
<?= $line[“time”] ?>//workign fine when user selcts time field
<? } else {?>
//this is problem area how i can print this live clock value if user dont select time as this clock is javascript(to get live clock)
what should i write code for clock
<? }?>
<? } ?>//end of while loop
</td>
if anybody help me out will be appreciable
thanks