无法将变量从一个php页面传递到另一页面. [英] Cannot pass variables from one php page to another.

查看:48
本文介绍了无法将变量从一个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(


这篇关于无法将变量从一个php页面传递到另一页面.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆