After creating php script for image/photo upload, you can search photo base from info.
here is a sample code:
<?php
$con = mysql_connect("localhost","root","yourpassword");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("sample", $con);
$result = mysql_query("SELECT * FROM table1 where lastname='rafiel dilo'");
$count=mysql_num_rows($result);
if($count==1)
{
while($row = mysql_fetch_array($result))
{
echo $picture = '<img src="' . $row['photo'] . '">';
}
}
else
{
echo "record not found";
}
mysql_close($con);
?>
No comments:
Post a Comment