如何使这个PHP表单工作 [英] How do I get this PHP form to work

查看:89
本文介绍了如何使这个PHP表单工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究的这段代码不起作用,我不知道为什么。请帮帮我。



我的尝试:



这是我写的代码。



这是main.html

 <   html  >  
< 表格 方法 =' GET' action =' index.php' < span class =code-keyword>>
名字:< input name =' 第一 type =' text' / >
< br / >
姓氏:< 输入 name =' last' 类型 =' text' / >
< br / >
< 按钮 type =' 提交' > 提交< / button >
< span class =code-keyword>< / form >
< / html >



__________________

这是index.php

 <?php  
$ _GET [' first' ] = $ first ;
$ _GET [' last'] = $最后;
?>



< script> 
var first,last,full;

first = <?php $ first?>;
last = <?php $ last?>;
document .write(first + < /跨度> +最后);
< / script>

解决方案

_GET [' first'] =


first ;


_GET [' last'] =

This code I've been working on won't work, and I Don't Know why. Please help me.

What I have tried:

This Is the code that I wrote.

This Is main.html

<html>
	<form method='GET' action='index.php'>
		First Name: <input name='first' type='text'/>
		<br/>
		Last Name: <input name='last' type='text'/>
		<br/>
		<button type='submit'>Submit</button>
	</form>
</html>


__________________
This Is index.php

<?php
$_GET['first'] = $first;
$_GET['last'] = $last;
?>


<script>
		var first, last, full;
		
		first="<?php $first ?>";
		last="<?php $last ?>";
		document.write(first+" "+last);
	</script>

解决方案

_GET['first'] =


first;


_GET['last'] =


这篇关于如何使这个PHP表单工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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