 |
ทำข้อสอบครับ แต่ทำได้ข้อเดียว ให้กลับมาทำข้อต่อไปไม่ได้ครับ |
|
 |
|
|
 |
 |
|
จาก test_check.php
ให้กลับมาที่ test.php
โดยใช้ header("location:test.php")
<script>window.location="test.php"</script>
|
 |
 |
 |
 |
Date :
2010-09-16 13:16:59 |
By :
iieszz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ระวังเรื่องข้อซ้ำไว้ด้วยนะครับ
|
 |
 |
 |
 |
Date :
2010-09-16 13:32:32 |
By :
iamatomix |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณนะครับ จะลองดูครับ
|
 |
 |
 |
 |
Date :
2010-09-17 01:47:01 |
By :
mix |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ยังไม่ได้ครับมันขึ้น
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Enas\test.php on line 141
แล้วในช่อง text field ก็ไม่มีอะไรขึ้นเลยครับ
หรือว่าใส่ header("location:test.php") กับ <script>window.location="test.php"</script> ผิดที่อ่ะครับ
หน้า test_check
$yp=0;
if($radio==""){
$noaction[$number]="$sid_test";
}
else{
if($answer=="$radio"){
$your_point="$yp";
$your_point++;
$frequency++;
$num++;
}
else{
$num++;
}
$lev=($frequency*100)/$num;
$sql="update $tb set num='$num',frequency='$frequency',level='$lev' where subject_id='$sid_test'";
$db_query=mysql_db_query($db,$sql);
mysql_close();
include("host_score.php");
$sql="select * from $tb where user_name='$your_name'";
$db_query=mysql_db_query($db,$sql);
mysql_query("INSERT INTO $tb (user_name,subject,date,full_score,your_score)
values('$your_name','$subject','$date_test','$full_point','$your_point')")or die ("add ลงฐานข้อมูลไม่ได้ ");
}
header("Location:test.php");
?>
<script>window.location="test.php"</script>
|
 |
 |
 |
 |
Date :
2010-09-17 02:14:34 |
By :
mix |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|