形成帮助 [英] form help

查看:55
本文介绍了形成帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。


我是PHP的初学者,目前我正在阅读一本书,

来创建一个简单的表单页面。不幸的是它没有用,并且

互联网上的书籍勘误页上没有列出任何内容。


我想知道你是否可以帮助我用它?


这只是一个表单,你在test_form.php

页面上输入你的名字,然后在test_form_processor.php页面上它应该是

说谢谢你,你的名字,填写表格。它没有显示您键入的名称



下面是两页代码的副本:


test_form.php

<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

< html xmlns =" http://www.w3.org/1999 / xhtml">

< head>

< meta http-equiv =" Content-Type" content =" text / html;

charset = iso-8859-1" />

< title> Untitled Document< / title>

< / head>


< body>

< form name =" frm_name" ID = QUOT; frm_name" method =" post"

action =" test_form_processor.php">

名字

< input name =" firstName" ;类型= QUOT;文本" ID = QUOT;&的firstName QUOT; />

< / form>

< / body>

< / html>

test_form_processor.php

<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

" http:/ /www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

< html xmlns =" http://www.w3.org/1999/xhtml" >

< head>

< meta http-equiv =" Content-Type" content =" text / html;

charset = iso-8859-1" />

< title> Untitled Document< / title>

< / head>


< body>

< p>谢谢你,<?php echo $ _POST [''firstName'']; ?> ;,填写我的

表格。

< / p>

< / body>

< / html>

非常感谢您提供的任何帮助。


John

Hello.

I am a beginner to PHP and I am currently just going through a book,
to create a simple form page. Unfortunately it doesn''t work, and
there is nothing listed on the books errata page on the internet.

I wondered if you can just help me with it?

It is just a form that you type your name in on the test_form.php
page, and then on the test_form_processor.php page it is supposed to
say Thank you, yourname, for completing the form. It doesn''t display
the name you type in though.
Below is a copy of the code for the two pages:

test_form.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form name="frm_name" id="frm_name" method="post"
action="test_form_processor.php">
First Name
<input name="firstName" type="text" id="firstName" />
</form>
</body>
</html>
test_form_processor.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<p>Thank you, <?php echo $_POST[''firstName'']; ?>, for filling out my
form.
</p>
</body>
</html>
Thanks very much for any help you can offer.

John

推荐答案

_POST [''firstName'']; ?> ;,填写我的

表格。

< / p>

< / body>

< / html>

非常感谢您提供的任何帮助。


John
_POST[''firstName'']; ?>, for filling out my
form.
</p>
</body>
</html>
Thanks very much for any help you can offer.

John


John写道:
John wrote:
我是PHP的初学者,我目前正在阅读一本书,
创建一个简单的表单页面。不幸的是它没有用,并且没有列出互联网上的书籍勘误页。

[...]

< p> ;谢谢,<?php echo
I am a beginner to PHP and I am currently just going through a book,
to create a simple form page. Unfortunately it doesn''t work, and
there is nothing listed on the books errata page on the internet.

[...]

<p>Thank you, <?php echo


_POST [''firstName'']; ?>,填写我的表格。
_POST[''firstName'']; ?>, for filling out my form.




请告诉我们您的PHP版本。如果您不知道,那么只需执行

函数phpinfo()。


问候,

Matthias



Please tell us your PHP version. If you don''t know it, then just execute
the function phpinfo().

Regards,
Matthias


这篇关于形成帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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