Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Image Retrieval

$
0
0
<?php
$server="localhost";
$username="myself";
$password="007";
$db="serving";

$con=new MySQLi($server,$username,$password,$db);
if(!$con)
{
die('Connection failed :'.$con->connect_error);	
}
else
{
	?>
    <html>
    <style type="text/css">
#apDiv1 {
	position:absolute;
	width:644px;
	height:345px;
	z-index:1;
	left: 28px;
	top: 140px;
}
</style>
	<div id="apDiv1">
  <form name="form1" method="post" action="<?php $_SERVER['PHP_SELF']?>">
  </form>
</div>
<?php
$qry="select content from upload";
$result=$con->query($qry);
$num=$result->num_rows;
	if($num > 0)
	{
	print"<table border='1'>";
	print'<tr><th>Name</th><th>Content</th></tr>';

  	while($pics=$reslt->fetch_array(MYSQLI_NUM))
  	{
  		print '<tr>';
		print '<td>'.$pics['name'].'</td>';
		print '<td>'.$pics['content'].'</td>';
		print '</tr>';
 	}
	 print"</table><br>";
	 echo $num.' record(s) found';
	}	
}
$result->free();
$con->close();
?>
</html>



Above is a php image retrieval i wrote but the major problem i am experiencing is that it throws a error
as see here below :
I would like if any could have a look at it if perhaps there is a proffered solution to it.... Thanks

Viewing all articles
Browse latest Browse all 51036

Trending Articles