I'm a student studying web programming im trying to display some of information from my db table which are(name, date, dll), all of the information are displayed perfectly except my id number from the db table and also there are no error so its hard for me to detect what i did wrong. can anyone see what i did wrong in my coding and explain what have i missed?
for further reference this is my php coding:
<?php
$con = mysql_connect("localhost", "root", "");
mysql_select_db("tempahperalatan");
if(isset($_POST['hantar']))
{
$noID = 'noID';
$pemohon = $_POST['pemohon'];
$trkhMula = $_POST['trkhMula'];
$trkhAkhir = $_POST['trkhAkhir'];
$n_program = $_POST['n_program'];
$lokasi = $_POST['lokasi'];
$n_anjuran = $_POST['n_anjuran'];
$catatan = $_POST['catatan'];
$masa = $_POST['masa'];
$t_Log = $_POST['t_Log'];
$modified_date;
$modified_time;
$sql = "INSERT INTO daftartempah (pemohon, trkhMula, trkhAkhir, n_program, lokasi, n_anjuran, catatan, modified_date, modified_time) VALUES ('$pemohon', '$trkhMula', '$trkhAkhir', '$n_program', '$lokasi', '$n_anjuran', '$catatan', CURDATE(), CURTIME())";
$res = mysql_query($sql);
}
$viewPerson = "SELECT * FROM daftartempah";
$viewPersonRes = mysql_query($viewPerson);
?>
and this is a table im trying to display some of my info from my db table:
<?php
while($row = mysql_fetch_array($viewPersonRes)){
echo "<tr>";
echo "<td".$row['noID']."</td>";
echo "<td>".$row['trkhMula']."</td>";
echo "<td>".$row['modified_time']."</td>";
echo "<td>".$row['n_program']."</td>";
echo "<td>".$row['pemohon']."</td>";
echo "<td>".$row['n_anjuran']."</td>";
echo "<td>".$row['lokasi']."</td>";
echo "<td>".$row['catatan']."</td>";
echo "</tr>";
}
?>
my table name from my db is: daftartempah
thank you in advance, your help is much needed :)