i used this code to sed the image to database
<?php
//conect to database
$con = mysql_connect('localhost', 'root', '') or die (mysql_error());
//select database table
$see = mysql_select_db("record",$con)or die ("cannot select DB");
//collect user's details
if (isset($_POST['submit'])){
//starting a sesion
session_start ();
$image=$_POST['image'];
$sql= "INSERT INTO register (image) VALUES('$image')";
mysql_query($sql);
$_SESSION['d'] ="
";
$_SESSION['de'] ="
";
$_SESSION['image'] = "";
header("location:department.php");
}
?>
What I have tried:
i have tried this and is not working
<?php
$con = mysql_connect('localhost', 'root', '') or die ("SERVER NOT FOUND".mysql_error());
$sel = mysql_select_db("record",$con)or die ("cannot select DB");
$result= @mysql_query (' SELECT imageROM register');
if(!$result){
exit('
Error performing query: ' .mysql_error() . '
');
}
while($row = mysql_fetch_array($result)){
echo '
';
echo '
';
echo"
";
echo"";
echo"
";
}
?>