[英]How to send more than two values from one form (takes values from mysql)to another using php $_GET with “? and &”?
我想使用PHP从MYsql检索三个值,并使用$ _Get函数将这三个值发送到其他形式,我正在获取前两个输入的值(至少在我所需的文本框中)。 我无法获得第三个值(P_age)
// in form where I retrieve values from Database and send it to other using "?" and "&"
$connection=mysql_connect("localhost", "root","");
mysql_select_db("Aravind_Database",$connection);
$v= mysql_query("Select * from patient_details order by P_id");
while ($row = mysql_fetch_array($v))
{
echo $row['P_id'];
echo "<tr><td>".$row['P_id']."</td><td>".$row['P_name']."</td><td>".$row['P_age']."</td><td>"."<a href=Editing_Patient_Detail.php>Edit</a></td><td><a href=Delete_Patient_Detail.php?P_id=".$row['P_id']."&P_name=".$row['P_name']."&P_age=".$row['P_age'].">Delete</a>";
}
mysql_close( $connection);
// form where I try to retrieve values through $_Get
$connection=mysql_connect("localhost", "root","");
mysql_select_db("Aravind_Database",$connection);
if ($_GET['P_id']!= '')
{
$v= mysql_query(" Select * from patient_details order by P_id");
while ($row = mysql_fetch_array($v))
{
if ($row['P_id'] == $_GET['P_id'])
{
?> <input type="text" value='<?php echo $_GET['P_id'] ?>' disabled="true" /><br>
<input type="text" width="145" value='<?php echo $_GET['P_name'] ?>' disabled="true" /><br>
<input type="text" value ='<?php echo $_GET['P_age']?>' disabled="true" /><br>
<?php
break;
}
}
mysql_close($connection);
}
enter code here
我会包括
name="myinput_name"
在输入标签中,并且当disabled为true时... GET和POST忽略它...我认为您应该将其设置为readonly =“ readonly”而不是disable
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.