I hope someone can help me, I've been struggling, I have a from and within the form is table which has columns. It retrieves the data from a Mysql table. In column 2 it displays the current information and in column 3 it displays the form options to update the values, eg:
First name: John [Form field to update]
Date of birth: 1970-01-01 [form field to update]
I'm specifically struggling to get the java script functioning for the popup calendar. If I run it from html it works fine but when I do it within php I can't get it to run because it displays the form within a while loop:
<head>
<script src="datetimepicker_css.js"></script>
</head>
<body>
<?php
.....
$sql2="SELECT * FROM em_detail WHERE id = '$data1'";
$result2=mysql_query($sql2);
echo "<form action='upd_emp.php' method=post>";
while($row2 = mysql_fetch_assoc($result2)) {
$id_2 = $row2['id'] ;
.....
echo "<tr>";
echo "<td height=35px><strong>Date of Birth: </strong></td>";
echo "<td>$dob_2</td>";
echo "<td><input size=30 type=Text name=dob id=demo1/></td>";
echo "<td align=left><img src=images/cal.gif onclick=javascript:NewCssCal('demo1') style=cursor:pointer/></td>";
echo " </tr>";