|
 |
|
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\nochp\emp_save.php on line 73 |
|
 |
|
|
 |
 |
|
มันขึ้น error แบบนี้คะ ไม่รู้ว่าผิดอะไร
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
//print_r($_POST);
//die();
//if (isset($_POST['save'])){
//require_once "include/connectdb.php";
require_once "includes/connect.php";
require_once "includes/tdate.php";
//include "inc.all.php";
if($_FILES["file"]["name"]!="")
{
//ถ้ามี
if($_FILES["file"]["size"]<2000000){ //ให้ตรวจสอบขนาด
$file = iconv("UTF-8", "TIS-620",$_FILES["file"]["name"]);
move_uploaded_file($_FILES["file"]["tmp_name"],"fileupload/" . $file);
/*move_uploaded_file($_FILES["file"]["tmp_name"],"fileupload/" . $_FILES["file"]["name"]);*/
$file=basename($_FILES["file"]["name"]);
}else{
//echo"ขนาดใหญ่เกินกรุณาไปแนบไฟล์มาให้";
?>
<script>
alert("ไฟล์ของคุณใหญ่เกินไปคะ");
location.href="index.php"
</script>
<?
exit();
}
//จบการตรวจสอบขนาด
}else{
//ถ้าไม่มี
$file='';
// หรืออาจจะใช้ java กล่องเตือน
}
$message=$_POST['message'];
$txtID1=$_POST['txtID1'];
$txtID2=$_POST['txtID2'];
$txtID3=$_POST['txtID3'];
$txtID4=$_POST['txtID4'];
$txtID5=$_POST['txtID5'];
$name=$_POST['name'];
$ages=$_POST['ages'];
$home=$_POST['home'];
$phone=$_POST['phone'];
$email=$_POST['email'];
$post=$_POST['post'];
$needs=$_POST['needs'];
$name_post=$_POST['name_post'];
$status=$_POST['status'];
echo mysql_query("INSERT INTO contact (message,idcard,name,ages,home,phone,email,post,needs,name_post,status,filename,dateregist,timeregist,ipaddress,date_create) values ('$message','$txtID1-$txtID2-$txtID3-$txtID4-$txtID5','$name','$ages','$home','$phone','$email','$post','$needs','$name_post','$status','$file','$e_date', '$etime','".$_SERVER['REMOTE_ADDR']."',NOW()) ") or die(mysql_error());
?>
<script>
alert("บันทึกข้อมูลเรียบร้อยแล้ว ");
location.href='index.php';
</script>
</body>
</html>
Tag : PHP, MySQL

|
|
 |
 |
 |
 |
Date :
2014-09-09 14:46:26 |
By :
NToo |
View :
3320 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
บรรทัด 33 <?
แก้เปน <?php
|
 |
 |
 |
 |
Date :
2014-09-09 14:57:40 |
By :
progamer2000 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณคะ
|
 |
 |
 |
 |
Date :
2014-09-09 15:08:11 |
By :
NToo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|