|
|
|
ช่วยหน่อยครับ php mysql ผมไม่สามารถ บันทึกข้อมูลลงฐานข้อมูลไม่ได้ |
|
|
|
|
|
|
|
Code (PHP)
<?
session_start();
$stdid=$_POST['stdid'];
$pname=$_POST['pname'];
$name=$_POST['name'];
$surname=$_POST['surname'];
$faculty=$_SESSION["faculty"];
$sport_id=$_SESSION["sport_id"];
$en=date("Y")+543;
$enyeaer=substr($en,2,2);
$username=$_SESSION["username"];
$status="1";
$time_regis=date("Y-m-d H:i:s");
include("inc/config.inc.php");
$sql="insert into sport_student_name (id,stdid,pname,name,surname,faculty,sport_id,status,enyear,username,time_regis) values ('null','$stdid','$pname','$name','$surname','$faculty','$sport_id,'$status','$enyear','$username','$time_regis')";
mysql_db_query($dbname,$sql);
?>
Tag : PHP
|
|
|
|
|
|
Date :
2012-09-03 03:31:35 |
By :
suntornbs |
View :
759 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
mysql_query($sql) or die(mysql_error());
เอา error มาดูครับ
|
|
|
|
|
Date :
2012-09-03 06:04:46 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณครับ จะลองดู
|
|
|
|
|
Date :
2012-09-03 10:42:32 |
By :
suntornbs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|