PHP从形式回声?救命! [英] PHP echo from form? HELP!

查看:79
本文介绍了PHP从形式回声?救命!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法弄清楚如何通过提交链接到外部php来回复表单中的名称







< html>

< head>

< title>示例网页表单< / title>

< / head>

< body>



Hello Form








< form>

请输入您的姓名:



<输入类型=textname =nameautofocus>

< input type =submitvalue =提交名称>

< / form>



if(!empty($ _ GET ['name']))

{

$ name = $ _GET ['name'];

echo

Hello $ name;

}

?>

< / body>

< / html>

















<! -

< html>

< head>

< title>示例网页表格< / title>

< / head>

< ; body>





Hello Form








< form action =hello.phpmethod =get>

请输入您的姓名:



< input type =textname =nameautofocus>

< input type =submitvalue = 提交姓名>

< / form>







< / body>

< / html>







< html>

< body>



- !>









帮助!

解决方案

_GET ['name']))

{


name =

_GET ['name'];

echo

Hello


Cant figure out how to echo name from form on submit with out linking to external php



<html>
<head>
<title>Sample web form</title>
</head>
<body>

Hello Form





<form>

Please enter your name:


<input type="text" name="name" autofocus>
<input type="submit" value="Submit Name">
</form>

if (!empty($_GET['name']))
{
$name = $_GET['name'];
echo "

Hello $name";
}
?>
</body>
</html>








<!--
<html>
<head>
<title>Sample web form</title>
</head>
<body>



Hello Form





<form action="hello.php" method="get">

Please enter your name:


<input type="text" name="name" autofocus>
<input type="submit" value="Submit Name">
</form>



</body>
</html>



<html>
<body>

--!>




HELP!

解决方案

_GET['name']))
{


name =


_GET['name'];
echo "

Hello


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

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