
php 提交表单后在显示新页面
我做了一个PHP的表单页面,表单要输入的部分代码如下:<html><head><metahttp-equiv="Content-Type"content="text/ht...
我做了一个PHP的表单页面,表单要输入的部分代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>测试</title>
</head>
<body>
<table width="283" height="85" border="1" cellpadding="0" cellspacing="0">
<form name="name1" method="post" action="test.php">
<tr>
<td width="114" height="30" align="center" >请输入:</td>
<td width="163" height="30" align="center"><input name="num" type="text" /></td>
<td> </td>
<td height="25"> <input name="submit" type="submit" value="submit" /></td>
</tr>
</form>
</table>
<?php
#require("db_config.php");
header("Content-type:text/html;charset=UTF-8");
if(!isset($_POST['submit']))
return ;
if($_POST['submit']=='submit'){
$num = $_POST['num'];
请问提交表单后把变量$num传送到新的页面并显示出来呢? 展开
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>测试</title>
</head>
<body>
<table width="283" height="85" border="1" cellpadding="0" cellspacing="0">
<form name="name1" method="post" action="test.php">
<tr>
<td width="114" height="30" align="center" >请输入:</td>
<td width="163" height="30" align="center"><input name="num" type="text" /></td>
<td> </td>
<td height="25"> <input name="submit" type="submit" value="submit" /></td>
</tr>
</form>
</table>
<?php
#require("db_config.php");
header("Content-type:text/html;charset=UTF-8");
if(!isset($_POST['submit']))
return ;
if($_POST['submit']=='submit'){
$num = $_POST['num'];
请问提交表单后把变量$num传送到新的页面并显示出来呢? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询