当用户在搜索页面上输入sayPatientID
然后按下搜索按钮时,我希望它进入数据库并根据PatientID
输入的信息提取所有信息。
我试过这个但是没有运气。它返回一个空白的白色屏幕。
<?php
include 'connect.php';
$id1 = $_POST['PatientID']; //Text box the user searches in
$result = mysqli_query($con,"SELECT * FROM PatientRecords WHERE PatientID=$id1");
while($row = mysqli_fetch_array($result))
{
echo
$row['PatientID'] . " " .
$row['FirstName']. " " .
$row['LastName']. " " .
$row['DOB']. " " .
$row['IDNumber1']. " " .
$row['Medication1']. " " .
$row['Medication1Dosage']. " " .
$row['IDNumber2']. " " .
$row['Medication2']. " " .
$row['Medication2Dosage']. " " .
$row['IDNumber3']. " " .
$row['Medication3']. " " .
$row['Medication3Dosage']. " " .
$row['MedicalNotes'];
echo "<br />";
}
mysqli_close($con);
?>