Hi can any one Fix this problem,
I am Uploading images to a folder , There i displays images but unfortunately display only the file name and not the image can any help me, BELOW IS THE CODE
[LIST=1]
[*]<?php
[*] include 'dbcon.php';
[*]?>
[*]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
[*]<html>
[*]<head>
[*]<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
[*]<title>DISPLAY IMAGES</title>
[*]</head>
[*]<body>
[*]<form action="display.php" method="post">
[*]<?php
[*]include 'aindex.php';
[*]$qry = "select * from tbl_album order by 'image_name'";
[*]$rst=mysql_query($qry,$con);
[*]$img_src="C:/wamp/www/prawin/new/locations/test/upload/image/";
[*]//$dir ="../display/uplaod/";
[*] $filename=basename($_FILES['uploadfile']['name']);
[*] $handle = opendir ("$img_src");
[*]?>
[*] <table width="70%" cellpadding=" 5px " cellspacing="45"
align="center" id="index">
[*]<?php
[*] $cnt=0;
[*] while (false !== ($file = readdir($handle))) {
[*] if($file != "." && $file != ".." && $file != basename(__FILE__)) {
[*] if(preg_match('/.*\.(.*)/',$file,$result)){
[*] $ext = $result[1];
[*] }
[*] if($file != ""){
[*] if($ext == 'gif' || $ext == 'jpg' || $ext == 'jpeg' || $ext == 'png'){
[*] if($cnt == 0){
[*] echo '<tr>';
[*] }
[*] echo '<td><img src="'.$file.'"/><br/>'.$file.'</td>';
[*] if($cnt == 2){
[*] echo "</tr>";
[*] $cnt=0;
[*] }else{
[*] $cnt++;
[*] }
[*] }
[*] }
[*] if($filename != "")
[*] echo '<img src="'.$filename.'"/>';
[*] }
[*] }
[*]?>
[*]</table>
[*]<?
[*]if(!rst)
[*]{
[*]die("error" .mysql_error());
[*]}
[*]mysql_close($con);
[*]?>
[*]</form>
[*]</body>
[*]</html> [/LIST]