I get this Notices what is happening and how do i get rid of it
Notice: Use of undefined constant no - assumed 'no' in c:\inetpub\wwwroot\JM Test PHP Pages\common.php on line 7
Notice: Undefined index: no in c:\inetpub\wwwroot\JM Test PHP Pages\common.php on line 7
Notice: Use of undefined constant no - assumed 'no' in c:\inetpub\wwwroot\JM Test PHP Pages\common.php on line 9
this is common.php is
<?php
function get_latest_no($type)
{
$sql = "SELECT $type AS no FROM numbers WHERE num = 1";
$result = mysql_query($sql);
$data = mysql_fetch_array($result);
$data["no"]++;
$sql = "UPDATE numbers SET message = $data[no] WHERE num = 1";
return $data[no];
}
?>