 |
|
งงค่ะ เอ่อเร๋อแบบนี้
Code
Warning: copy() [function.copy]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/pibul/:/tmp:/var/tmp:/usr/local/lib/php/) in /home/pibul/domains/morpibul.com/public_html/huadong/admin/add_grade/PageUploadToMySQL2.php on line 7
โค้ดนี้
Code (PHP)
<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874"></head>
<body>
<?
if(copy($_FILES["filUpload"]["tmp_name"],"myfile/".$_FILES["filUpload"]["name"]))
$name = $_POST['name'];
$name = $_POST['lname'];
$name = $_POST['code'];
$name = $_POST['mor'];
$name = $_POST['math'];
$name = $_POST['thai'];
$name = $_POST['socail'];
$name = $_POST['eng'];
$name = $_POST['scien'];
$name = $_POST['fi'];
$name = $_POST['ke'];
$name = $_POST['bio'];
$name = $_POST['sub1'];
$name = $_POST['sub2'];
$name = $_POST['sub3'];
$name = $_POST['scoresub1'];
$name = $_POST['scoresub2'];
$name = $_POST['scoresub3'];
$name = $_POST['grade'];
{
echo "Copy/Upload Complete<br>";
//*** Insert Record ***//
$objConnect = mysql_connect("localhost","pibul_bb","123456") or die("Error Connect to Database");
mysql_query("SET NAMES TIS620");
$objDB = mysql_select_db("pibul_aa");
$strSQL = "INSERT INTO files ";
$strSQL .="(FilesName,name, lname, code,mor,math,thai,socail,eng,scien,fi,ke,bio,sub1,sub2,sub3,scoresub1,scoresub2,scoresub3,grade) VALUES ('".$_FILES["filUpload"]["name"]."','$name','$lname','$code','$mor','$math','$thai','$socail','$eng','$scien','$fi','$ke','$bio','$sub1','$sub2','$sub3','$scoresub1','$scoresub2','$scoresub3','$grade')";
$objQuery = mysql_query($strSQL);
}
?>
</body>
</html>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2010-05-28 14:16:26 |
By :
jiingoath |
View :
1059 |
Reply :
5 |
|
 |
 |
 |
 |
|
|
|
 |