如何使用php?Email =#检索记录


How do you use php?email=# to retrieve record

在abc.php中,我有一个动作是xyz.php的表单。我希望$email=$POST['txtEmail']在xyz.php

中使用

为此,我输入:<form id="form1" name="form1" method="post" action="xyz.php?<?php $email=$_POST['txtEmail']; ?>">

这是正确的做法吗?

编辑

abc.php

 <form id="form1" name="form1" method="post" action="xyz.php">
     <input name="txtEmail" type="text" size="30" />
     <input type="submit" name="Submit2" value="Submit" />
 </form>

xyz.php

<form id="form1" name="form1" method="post" action="def.php">
   <input type="text" name="txtAns" />                                                
   <input type="hidden" name="txtEmail" id="txtEmail" value="<?php echo $_POST['txtEmail']; ?>" />
  <input type="submit" name="submitEmail" value="Submit" />
</form>

def.php

$email=$_POST['txtEmail'];

编辑

在abc.php:

<form id="form1" name="form1" method="post" action="xyz.php">
  <input type="text" name="email" id="email" />
</form>
在xyz.php

<form id="form2" name="form2" method="post" action="def.php">
  <input type="hidden" name="email" id="email" value="<?php echo $_POST['email']; ?>" />
</form>
在def.php

$email = $_POST['email'];

这就是你想要的吗?