duan7772 2013-05-26 00:01
浏览 22
已采纳

从php表单输入不在其他页面中填充值[关闭]

I have read multiple questions posted and am unable to locate one that directly answers what I am trying to accomplish. I have tried several suggestions in other posting answers but still have not the results I am seeking.

I am trying to get input to populate on my sample page (single2.php) from single_name form.

Here is the code on single_name.php:

<form name="singlename" method="post" action="./single2.php" id="Form1" onsubmit="return Validatesinglename(this)">
<div id="wb_Text1" style="position:absolute;left:10px;top:15px;width:81px;height:16px;z-index:0;text-align:left;"><span style="color:#000000;font-family:Arial;font-size:13px;">Name:</span></div><input type="text" id="name" style="position:absolute;left:101px;top:15px;width:198px;height:23px;line-height:23px;z-index:1;" name="name" value="" autocomplete="off">
<div id="wb_Text2" style="position:absolute;left:10px;top:45px;width:81px;height:16px;z-index:2;text-align:left;"><span style="color:#000000;font-family:Arial;font-size:13px;">Gender:</span></div><input type="text" id="gender" style="position:absolute;left:101px;top:45px;width:198px;height:23px;line-height:23px;z-index:25;" name="Gender" value="">
<div id="wb_Text3" style="position:absolute;left:10px;top:75px;width:81px;height:16px;z-index:4;text-align:left;"><span style="color:#000000;font-family:Arial;font-size:13px;">Date of Birth:</span></div><input type="date" id="dob" style="position:absolute;left:101px;top:75px;width:198px;height:23px;line-height:23px;z-index:5;" name="dob:" value="" autocomplete="off">
<div id="wb_Text4" style="position:absolute;left:10px;top:105px;width:81px;height:16px;z-index:6;text-align:left;"><span style="color:#000000;font-family:Arial;font-size:13px;">Message:</span></div><input type="text" id="message" style="position:absolute;left:101px;top:105px;width:198px;height:23px;line-height:23px;z-index:7;" name="Message:" value="" autocomplete="off">
<input type="submit" id="Button1" name="" value="Send" style="position:absolute;left:101px;top:135px;width:96px;height:25px;z-index:8;">
<input type="reset" id="Button2" name="" value="Reset" style="position:absolute;left:207px;top:136px;width:96px;height:25px;z-index:9;">
</form>

and here is what is on single2.php:

<div id="wb_Text1" style="position:absolute;left:428px;top:514px;width:515px;height:391px;text-align:center;z-index:29;">
   echo $_POST["name"]; 
}
?></strong></span><span style="color:#000000;font-family:Chancellor;font-size:19px;">
<br>
<br>
Local Origin of Name:&nbsp; Unique and Original<br>From the name
<?php
{
   echo $_POST["name"]; 
}    <br>
<br>
Evaluation Meaning:&nbsp; Festive, Joyous
<br>
<br>
<strong>&#0042;</strong> Emotional Spectrum <strong>&#0042;</strong>
<br>
Up front and honest
<br>
<strong>&#0042;</strong> Personal Integrity <strong>&#0042;</strong>
<br>
Friends know that
<?php
{
   echo $_POST["name"]; 
?>
can be called on in a crisis.
<br>
<strong>&#0042;</strong> Personality <strong>&#0042;</strong>
<br>
Life in the fast lane, tempered by common sense.
<br>
<strong>&#0042;</strong>&nbsp; Relationships <strong>&#0042;</strong>
<br>
Stays true and loyal
<br>
<br>
<?php
{
   echo $_POST["name"]; 
}
?>    is a 
<?php
{
   echo $_POST["gender"]; 
}
?>
<br>
<br>
{
   echo $_POST["name"]; 
}
?>
was born 
<?php
{
   echo $_POST["dob"]; 
}
?>
<br>
<br>
</span>
<span style="color:#000000;font-family:Georgia;font-size:27px;"><strong><em>
<?php
{
   echo $_POST["message"]; 
}
?></em></strong>
</span>

I can get the "name" to post at each place, but the "gender", "dob" and "message" does not post.

Any help would be greatly appreciated.

  • 写回答

6条回答 默认 最新

  • dongxian6715 2013-05-26 00:06
    关注

    You spelled your names wrong on single_name.php

    name="Gender"
    name="dob:"
    name="Message:"
    

    You must use the same names (lowercase without colon)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(5条)

报告相同问题?

悬赏问题

  • ¥60 pb数据库修改或者求完整pb库存系统,需为pb自带数据库
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路