You are doing this wrong.
if (!mysql_query ($view, $con))
{
die ('Error Sir' . mysql_error());
}
mysql_query() function's first argument should be a string(a SQL query).
Once you have queried the database using $view = mysql_query("SELECT * FROM bulletin ORDER BY pro_no DESC"); , you check the return value of mysql_query() to see if it executed successfully. It returns false on error. Hence
to check
if (!$view) {
// error
}
vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42