|
|
|
Form Contact แบบแนบรูป Submit แล้วไม่ขึ้น อะไรเลยครับ ไม่แสดง ERROR ด้วยครับ |
|
|
|
|
|
|
|
Code (PHP)
if($_FILES["filUpload"]!= "")
{
//*** Read file BINARY ***'
$fp = fopen($_FILES["filUpload"]["tmp_name"],"r");
$ReadBinary = fread($fp,filesize($_FILES["filUpload"]["tmp_name"]));
fclose($fp);
$FileData = addslashes($ReadBinary);
//*** Insert file BINARY ***'
$strSQL = "INSERT INTO pd_contact";
$strSQL .="(con_name,con_email,con_subject,con_tel,con_file,con_detail) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["text_name"]."','".$_POST["text_email"]."'";
$strSQL .="'".$_POST["text_tel"]."','".$_POST["text_subject"]."'";
$strSQL .="'".$FileData."','".$_POST["text_detail"]."')";
$objQuery = mssql_query($strSQL);
if($objQuery)
{
echo "<center>Save Done.</center>";
}
else
{
echo "<center>Error Save [".$strSQL."]</center>";
}
}
mssql_close($objConnect);
ช่วยตรวจให้ด้วยครับ....
Tag : PHP, Ms SQL Server 2005, Ms SQL Server 2008
|
|
|
|
|
|
Date :
2012-05-21 13:17:43 |
By :
time.toon |
View :
985 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Form Contact นี่รึยัง
Code (PHP)
<form name="contect" medthod="post" enctype="multipart/form-data" >
.
.
.
</form>
|
|
|
|
|
Date :
2012-05-21 13:31:54 |
By :
mangkunzo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ดูโค้ดไม่น่าจะผิดอะไรนะครับ มีข้อมูลเพิ่มเติมอีกป่าว
|
|
|
|
|
Date :
2012-05-21 14:24:03 |
By :
keng_ds |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|