我想使用 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