here is the code snippet
yet the condition never fails! shouldn't the result = 0 if the record can't be found?PHP Code:$query = "SELECT linkid, linkdescrip, linkurl, linkowner FROM links WHERE linkurl = '$linkurl'";
$result = mysql_query($query);
if(!$result) error_message(sql_error());
$query_data = mysql_fetch_array($result);
$linkid = $query_data["linkid"];
$linkurl = $query_data["linkurl"];
$linkdescrip = $query_data["linkdescrip"];
$linkowner = $query_data["linkowner"];
$query_data = mysql_fetch_row($result);
$total_num = $query_data[0];
if (!$result) {
echo "record not found!";
exit;
}
else {
echo "$result";
echo "<h1>Showing link from database</h1><p>";
echo "<h2>Link Number: $linkid Url: $linkurl<br>Description: $linkdescrip<br>Link owner: $linkowner</br></h2$
echo "Total links: $total_num";





Bookmarks