AL8 Forum
   登錄註冊幫助
標題: help
 p0310445
 0057764
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 430

精華: 0

積分: 130 點

現金: 544 元

存款: 0 元

閱讀權限: 25

註冊: 2006-11-12

狀態: 離線
 
發表於 2008-7-1 13:49  資料  個人空間  短消息  加為好友 
help

[attach]63151[/attach]
點改個代碼
例如
我打xxx 之後按去

就去到 http://whyyy.hk/game/xxx/

我改唔到><

<td colspan="3">
    <form name="dict" action="http://whyyy.hk/game/" method="GET" target="_blank">
<tr><td colspan="3">
  <p align="center"> <span class="style3">你的答案是:</span>
    <input TYPE="text" NAME="s" VALUE="" size="20"> <input type="submit" value="去!">
</form></td>




 附件: 您所在的用戶組無法下載或查看附件



Whyyy論壇
http://whyyy.nets.hk/
歡迎黎玩!
 AL8 Forum © All rights reserved.
頂部
 ysk
 0010759
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

帖子: 1244

精華: 0

積分: 10526 點

現金: 5244 元

存款: 0 元

閱讀權限: 70

註冊: 2004-10-31

狀態: 離線
 
發表於 2008-7-1 13:59  資料  個人空間  短消息  加為好友  添加 ysk 為MSN好友 通過MSN和 ysk 交談
<form name="dict" action="改呢到" method="GET" target="_blank">




 AL8 Forum © All rights reserved.
頂部
 廢廢廢
 0088901
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 146

精華: 0

積分: 1770 點

現金: -102 元

存款: 0 元

閱讀權限: 20

註冊: 2007-10-12

狀態: 離線
 
發表於 2008-7-1 14:22  資料  個人空間  短消息  加為好友 
<input type="button" onclick="window.location.href='xxx/'" />




 AL8 Forum © All rights reserved.
頂部
 p0310445
 0057764
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 430

精華: 0

積分: 130 點

現金: 544 元

存款: 0 元

閱讀權限: 25

註冊: 2006-11-12

狀態: 離線
 
發表於 2008-7-1 14:45  資料  個人空間  短消息  加為好友 


QUOTE:
原帖由 ysk 於 2008-7-1 13:59 發表
<form name="dict" action="改呢到" method="GET" target="_blank">

點解?
我都改做左
http://whyyy.hk/game
BUT打左XXX之後按去
變左http://whyyy.hk/game/?S=XXX




Whyyy論壇
http://whyyy.nets.hk/
歡迎黎玩!
 AL8 Forum © All rights reserved.
頂部
 ProSPY001
 0012406
Rank: 3Rank: 3Rank: 3
點擊查看 ProSPY001 的詳細資料

頭銜: Conqueror

帖子: 216

精華: 0

積分: 1590 點

現金: 0 元

存款: 17072 元

閱讀權限: 20

註冊: 2004-11-30

來自: SPY NET

狀態: 離線
 
發表於 2008-7-1 16:25  資料  個人空間  主頁 短消息  加為好友 
try this

  你的答案是:
  <input type="text" id="ans" name="s" size="20" />
  <input type="submit" name="Submit" value="去!" onclick="window.location='http://whyyy.hk/game/'+document.getElementById('ans').value"/>





快加入http://www.spynet.hk,版主大招募現正進行中
 AL8 Forum © All rights reserved.
頂部
 ysk
 0010759
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

帖子: 1244

精華: 0

積分: 10526 點

現金: 5244 元

存款: 0 元

閱讀權限: 70

註冊: 2004-10-31

狀態: 離線
 
發表於 2008-7-1 20:14  資料  個人空間  短消息  加為好友  添加 ysk 為MSN好友 通過MSN和 ysk 交談


QUOTE:
原帖由 p0310445 於 2008-7-1 14:45 發表

點解?
我都改做左
http://whyyy.hk/game
BUT打左XXX之後按去
變左http://whyyy.hk/game/?S=XXX

NAME="s"




 AL8 Forum © All rights reserved.
頂部
 henryplus
 0097277
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 408

精華: 0

積分: 4090 點

現金: 510 元

存款: 0 元

閱讀權限: 25

註冊: 2008-3-2

狀態: 離線
 
發表於 2008-7-1 21:32  資料  個人空間  短消息  加為好友 
你唔想有?s=xx

你可以用method="post"




 AL8 Forum © All rights reserved.
頂部
 hopkins
 0058431
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 149

精華: 0

積分: 1710 點

現金: -597 元

存款: 116 元

閱讀權限: 20

註冊: 2006-11-20

狀態: 離線
 
發表於 2008-7-2 13:52  資料  個人空間  短消息  加為好友 
1.html

<td colspan="3">
    <form name="dict" action="checker.php" method="POST" target="_blank">
<tr><td colspan="3">
  <p align="center"> <span class="style3">你的答案是:</span>
    <input TYPE="text" NAME="s" VALUE="" size="20"> <input type="submit" value="去!">
</form></td>

checker.php

<?php
$answer = $_POST['dict']
header ("Location: http://whyyy.hk/game/$answer/");
?>





 AL8 Forum © All rights reserved.
頂部
 廢廢廢
 0088901
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 146

精華: 0

積分: 1770 點

現金: -102 元

存款: 0 元

閱讀權限: 20

註冊: 2007-10-12

狀態: 離線
 
發表於 2008-7-2 17:35  資料  個人空間  短消息  加為好友 


QUOTE:
原帖由 hopkins 於 2008-7-2 13:52 發表
1.html
<td colspan="3">
    <form name="dict" action="checker.php" method="POST" target="_blank">
<tr><td colspan="3">
  <p align="center"> <span class="style3">你的答案是:</span>
    <i ...

header("location:".$checker);




 AL8 Forum © All rights reserved.
頂部
 1224
 0017619
Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7
點擊查看 1224 的詳細資料

頭銜: Moderator

自述: KENNY

帖子: 2925

精華: 0

積分: 31743 點

現金: 10 元

存款: 585 元

閱讀權限: 100

註冊: 2005-3-13

狀態: 離線
 
發表於 2008-7-2 18:51  資料  個人空間  主頁 短消息  加為好友 
回覆 #8 hopkins 的帖子

php變數唔可以就咁Location

QUOTE:
header ("Location: http://whyyy.hk/game/$answer/");

回覆 #9 廢廢廢 的帖子
$checker未定義=.=
要$_POST['checker']
P.S.直接D講,你地D method唔得=.=
=================================================================
先問樓主
http://whyyy.hk/game/xxx/
係咪check 答案頁面?
個check答案頁面係http://whyyy.hk/game/xxx/index.php ??
==============================================================
俾個例子你
answer.htm

<td colspan="3">
    <form name="dict" action="check.php" method="POST" target="_blank">
<tr><td colspan="3">
  <p align="center"> <span class="style3">你的答案是:</span>
    <input TYPE="text" NAME="s" VALUE="" size="20"> <input type="submit" value="去!">
</form></td>

check.php

<?
if($_POST['s'] == '答案'){
echo("Correct");
}else{
echo("Incorrect");
}
include 'answer.htm';
?>

或參考
1個php過
check.php

<?
if(!$_GET['submit']){
?>
<td colspan="3">
    <form name="dict" action="check.php?submit=true" method="post" target="_blank">
<tr><td colspan="3">
  <p align="center"> <span class="style3">你的答案是:</span>
    <input type="text" name="answer" size="20"><input type="submit" value="去!">
</form></td>
<?
}else{
if($_POST['answer'] == '答案'){
echo("Correct");
}else{
echo("Incorrect");
}
}
?>

[ 本帖最後由 1224 於 2008-7-2 19:21 編輯 ]




 AL8 Forum © All rights reserved.
頂部
 p0310445
 0057764
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 430

精華: 0

積分: 130 點

現金: 544 元

存款: 0 元

閱讀權限: 25

註冊: 2006-11-12

狀態: 離線
 
發表於 2008-7-3 18:56  資料  個人空間  短消息  加為好友 
回覆 #10 1224 的帖子

謝謝~就是這樣~但我想correct左就會轉頁~thx




Whyyy論壇
http://whyyy.nets.hk/
歡迎黎玩!
 AL8 Forum © All rights reserved.
頂部
 1224
 0017619
Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7
點擊查看 1224 的詳細資料

頭銜: Moderator

自述: KENNY

帖子: 2925

精華: 0

積分: 31743 點

現金: 10 元

存款: 585 元

閱讀權限: 100

註冊: 2005-3-13

狀態: 離線
 
發表於 2008-7-3 19:53  資料  個人空間  主頁 短消息  加為好友 


echo("Correct");

改為

header("Location: xxx.php");





 AL8 Forum © All rights reserved.
頂部
 p0310445
 0057764
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 430

精華: 0

積分: 130 點

現金: 544 元

存款: 0 元

閱讀權限: 25

註冊: 2006-11-12

狀態: 離線
 
發表於 2008-7-4 09:27  資料  個人空間  短消息  加為好友 
3q~最後一個問題
可唔可以兩個不同的html
都用e個php check答案@@?




Whyyy論壇
http://whyyy.nets.hk/
歡迎黎玩!
 AL8 Forum © All rights reserved.
頂部
 廢廢廢
 0088901
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 146

精華: 0

積分: 1770 點

現金: -102 元

存款: 0 元

閱讀權限: 20

註冊: 2007-10-12

狀態: 離線
 
發表於 2008-7-4 10:09  資料  個人空間  短消息  加為好友 


QUOTE:
原帖由 p0310445 於 2008-7-4 09:27 發表
3q~最後一個問題
可唔可以兩個不同的html
都用e個php check答案@@?

elseif




 AL8 Forum © All rights reserved.
頂部
 1224
 0017619
Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7
點擊查看 1224 的詳細資料

頭銜: Moderator

自述: KENNY

帖子: 2925

精華: 0

積分: 31743 點

現金: 10 元

存款: 585 元

閱讀權限: 100

註冊: 2005-3-13

狀態: 離線
 
發表於 2008-7-4 11:30  資料  個人空間  主頁 短消息  加為好友 
整多個htm
都係

<form name="dict" action="check.php" method="POST" target="_blank">

另外在check.php
刪除

include 'answer.htm';





 AL8 Forum © All rights reserved.
頂部
 p0310445
 0057764
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 430

精華: 0

積分: 130 點

現金: 544 元

存款: 0 元

閱讀權限: 25

註冊: 2006-11-12

狀態: 離線
 
發表於 2008-7-4 16:24  資料  個人空間  短消息  加為好友 
我的意思是
例:
A.HTM個答案ABC
B.HTM個答案系DEF
我唔想再整多個PHP黎CHECK B.HTM
咁做唔做到




Whyyy論壇
http://whyyy.nets.hk/
歡迎黎玩!
 AL8 Forum © All rights reserved.
頂部
 1224
 0017619
Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7
點擊查看 1224 的詳細資料

頭銜: Moderator

自述: KENNY

帖子: 2925

精華: 0

積分: 31743 點

現金: 10 元

存款: 585 元

閱讀權限: 100

註冊: 2005-3-13

狀態: 離線
 
發表於 2008-7-5 00:24  資料  個人空間  主頁 短消息  加為好友 
回覆 #16 p0310445 的帖子

check.php

if($_POST['s'] == '答案'){

改為

if($_POST['s'] == $_POST['correctanswer']){

在htm檔內

<form name="dict" action="check.php" method="POST" target="_blank">

下面加

<input type="hideen" name="correctanswer" value="答案">

如A.htm就下面加

<input type="hideen" name="correctanswer" value="ABC">

如B.htm就下面加

<input type="hideen" name="correctanswer" value="DEF">





 AL8 Forum © All rights reserved.
頂部
 hklcf
 0002924
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6
點擊查看 hklcf 的詳細資料

頭銜: Forum Legend

自述: HKDz ...

帖子: 1900

精華: 4

積分: 44643 點

現金: 0 元

存款: 323033 元

閱讀權限: 70

註冊: 2004-6-16

來自: Hong Kong

狀態: 離線
 
發表於 2008-7-5 08:54  資料  個人空間  主頁 短消息  加為好友  添加 hklcf 為MSN好友 通過MSN和 hklcf 交談 QQ ICQ 狀態


QUOTE:
原帖由 1224 於 2008-7-5 00:24 發表
check.php
if($_POST == '答案'){
改為
if($_POST == $_POST){
在htm檔內
<form name="dict" action="check.php" method="POST" target="_blank">
下面加
<input type="hideen" name="correctanswer"  ...

一睇html就知答案




 AL8 Forum © All rights reserved.
頂部
 p0310445
 0057764
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 430

精華: 0

積分: 130 點

現金: 544 元

存款: 0 元

閱讀權限: 25

註冊: 2006-11-12

狀態: 離線
 
發表於 2008-7-5 11:06  資料  個人空間  短消息  加為好友 
如果就咁原始檔就睇唔到LO@@
THZ 1224




Whyyy論壇
http://whyyy.nets.hk/
歡迎黎玩!
 AL8 Forum © All rights reserved.