无法将变量从一个php页面传递到另一页面.
我使用以下代码编写了一个php页面:
I used following code to write a php page:
<html>
<!-- jobapp_action.php -->
<body>
<P>Welcome <?php $_GET['applicant']; ?>!</P>
</body>
</html>
接下来,通过在以下HTML页面中按Enter按钮并输入"Shah Rukh":
Next, by pressing Enter button in the following HTML page and entering "Shah Rukh":
OK, OK I used the method you specified in an HTML page. Here it is:
<HTML>
<!-- jobapp.html -->
<body>
<h1>Phop's Bicycles Job Application</h1>
<p>Are you looking for an exciting career in the world of cyclery?
Look no furthur!
</p>
<form NAME='frmJobApp' METHOD="get" ACTION="jobapp_action.php">
Please enter your name:
<INPUT NAME="applicant" type="text"><br />
<INPUT NAME="enter" type="submit" value="Enter"><br />
</form>
</body>
<HTML>
我收到以下页面:
欢迎您!
而不是预期的:
欢迎Shah Rukh!
我不明白为什么$ _GET不能正常工作,因为我是php编程的新手.请帮帮我.
预先感谢.
I receive following page:
Welcome !
Instead of expected this one:
Welcome Shah Rukh!
I cannot understand why $_GET is not working as I am very new to php programming. Please help me out.
Thanks in advance.
_GET ['applicant']; ? > !< > < /body > < /html >
_GET['applicant']; ?>!</P> </body> </html>
接下来,通过在以下HTML页面中按Enter按钮并输入"Shah Rukh":
Next, by pressing Enter button in the following HTML page and entering "Shah Rukh":
OK, OK I used the method you specified in an HTML page. Here it is:
<HTML>
<!-- jobapp.html -->
<body>
<h1>Phop's Bicycles Job Application</h1>
<p>Are you looking for an exciting career in the world of cyclery?
Look no furthur!
</p>
<form NAME='frmJobApp' METHOD="get" ACTION="jobapp_action.php">
Please enter your name:
<INPUT NAME="applicant" type="text"><br />
<INPUT NAME="enter" type="submit" value="Enter"><br />
</form>
</body>
<HTML>
我收到以下页面:
欢迎您!
而不是预期的:
欢迎Shah Rukh!
我不明白为什么
I receive following page:
Welcome !
Instead of expected this one:
Welcome Shah Rukh!
I cannot understand why
_GET无法正常工作,因为我对php编程非常陌生.请帮帮我.
预先感谢.
_GET is not working as I am very new to php programming. Please help me out.
Thanks in advance.
您应该回显它:
You should echo it:
<html>
<!-- jobapp_action.php -->
<body>
<P>Welcome <?php echo(