I have a problem.Can any of u please help me to find the coding that suits my php application to upload files from client and store in in the server.
This is the code, do you know how to determine the directory path for it to work?
<?php
chdir ("/upload/file/");
$dir =opendir("../user_upload");
while ($file=readdir($dir)) {
if (($file != ".") AND ($file != "..")) {require "connect.inc.php";
$command="SELECT * FROM share WHERE shareName='$file'";
$result=mysql_query($command);
$data=mysql_fetch_array($result);
$no=$data[no];
$by=$data[postedBy];
$desc=$data[shareDesc];
echo("<table width=\"90%\" border=0 cellspacing=0 cellpadding=3 align=\"center\">");
echo("<tr><td width=\"95%\"><a href=\"../user_upload/$file\" target=\"_blank\" title=\"Click to open or download file\">$file</a><br></td>");
echo("<td width=\"5%\">");
}else{}
?>