Hello there Admins,
I would like to display the image on his/her profile. This is so far the codes i have made. It displays only the outline border of the image but not the student's image itself.
<?php
session_start();
$session_id = $_SESSION['admin_id'];
if($session_id == null){
header("location:Admin_Home.php");
die();
}
include 'Connect.php';
$student_id = htmlentities($_REQUEST['id'], ENT_QUOTES);
$result = mysql_query("SELECT * FROM student_information where student_id='$_GET[id]'");
$data = mysql_fetch_array($result);
$numRows = mysql_numrows($result);
$i = 0;
while($i < $numRows) {
?>
<img src="display_image.php?id=<?php echo mysql_result($data,$i,"id"); ?>" width="175" height="200"
<?php
$i++;
}
?>
Please advise me how to modify these codes to make the image display.
By the way this is the display_image.php i created.
<?php
include 'Connect.php';
$flag = "";
$student_id = htmlentities($_REQUEST['id'], ENT_QUOTES);
if (IsSet($_GET['id'])){
$result = @mysql_query("select * from student_information where student_id = ".$_GET['id']);
header("Content-type: image/jpeg");
header("Pragma: public");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Disposition: attachment; filename=\"".basename($filename)."\";" );
header("Content-Transfer-Encoding: binary");
header("Content-Type: PHP Generated Data");
header("Content-Length: ".filesize($filename));
while ($data = mysql_fetch_array($result))
{
print $data['LRCard'];}
mysql_free_result($result);
}
?>