I have a page (html&php)from this page post this action to
<form method=post action="loadfil e.php" ENCTYPE="multip art/form-data
well the loadfile.php is a script for upload file to the mysql data base and this is the code for loadfile.php
i want to change this code and make it upload to folder like (my upload
) on the hard disk folder's (www)
in the same thing i want to make download to my hard disk from new file named (mydownload) and this is folder existing where (appserv) already installed (www) folder
i hope to accept my best regards and best wishes
<form method=post action="loadfil e.php" ENCTYPE="multip art/form-data
well the loadfile.php is a script for upload file to the mysql data base and this is the code for loadfile.php
Code:
<?php $fold=$_REQUEST['fname'];$title=$_REQUEST['title'];$uploadedfile=$_REQUEST['uploadingfile']; $host="localhost";$user="";$pass="";$dbid="upload";$link=mysql_connect($host,$user,$pass);mysql_select_db($dbid); $path="hi/". $_FILES['uploadingfile']['name'];echo $path; move_uploaded_file($_FILES['uploadingfile']['tmp_name'],$path); mysql_query("insert into loading(folder,title,fileload) values('$fold','$title','$path')"); mysql_close($link); ?><?php
$fold=$_REQUEST['fname'];
$title=$_REQUEST['title'];
$uploadedfile=$_REQUEST['uploadingfile'];
$host="localhost";
$user="";
$pass="";
$dbid="upload";
$link=mysql_connect($host,$user,$pass);
mysql_select_db($dbid);
$path="hi/". $_FILES['uploadingfile']['name'];
echo $path;
move_uploaded_file($_FILES['uploadingfile']['tmp_name'],$path);
mysql_query("insert into loading(folder,title,fileload) values('$fold','$title','$path')");
mysql_close($link);
?>
) on the hard disk folder's (www)
in the same thing i want to make download to my hard disk from new file named (mydownload) and this is folder existing where (appserv) already installed (www) folder
i hope to accept my best regards and best wishes
Comment