http://www.healthviewone.com/PHP/Meds/med-update.php
The URL above takes me to the following URL which is coming out blank. Can someone review my code below and tell me why I am getting this blank page?
P.S. the patient information is bogus, not real. So no HIPPA concerns at all.
http://www.healthviewone.com/PHP/Meds/meds-change-form.php
<html><head><title>Change Record form</title>
<style type="text/css">
td {font-family: tahoma, arial, verdana; font-size: .875em }
</style>
</head>
<body>
<?
$id=$_POST;
$db="freedomone";
$link = mysql_connect("");
if (!$link)
die(mysql_error());
mysql_select_db($db, $link)
or die("Couldn't open $db: ".mysql_error());
$query=" SELECT * FROM Liberty WHERE PatientID='id'";
$ret = mysql_query($query) or die(mysql_error());
$result=mysql_query($query);
$num=mysql_num_rows($result);
$i=0;
while ($i < $num) {
$FName=mysql_result($result,$i,"FName");
$LName=mysql_result($result,$i,"LName");
$PatientPhone=mysql_result($result,$i,"PatientPhone");
$FacName=mysql_result($result,$i,"FacName");
$FacAddress=mysql_result($result,$i,"FacAddress");
$PatRoom=mysql_result($result,$i,"PatRoom");
$FacCity=mysql_result($result,$i,"FacCity");
$FacState=mysql_result($result,$i,"FacState");
$FacZip=mysql_result($result,$i,"FacZip");
$FacPhone=mysql_result($result,$i,"FacPhone");
$CaregiverName=mysql_result($result,$i,"CaregiverName");
$CaregiverContactPhone=mysql_result($result,$i,"CaregiverContactPhone");
$MedDispenseTime1=mysql_result($result,$i,"MedDispenseTime1");
$MedDispenseTime2=mysql_result($result,$i,"MedDispenseTime2");
$MedDispenseTime3=mysql_result($result,$i,"MedDispenseTime3");
$MedDispenseTime4=mysql_result($result,$i,"MedDispenseTime4");
$MedDispenseTime5=mysql_result($result,$i,"MedDispenseTime5");
$MedDispenseTime6=mysql_result($result,$i,"MedDispenseTime6");
$Month=mysql_result($result,$i,"Month");
$Year=mysql_result($result,$i,"Year");
?>
<table width="600" cellpadding="10" cellspacing="0" border="2">
<tr align="center" valign="top">
<td align="center" colspan="1" rowspan="1" bgcolor="#64b1ff">
<h3>Edit and Submit</h3>
<form action="meds-change-record.php" method="post">
<input type="hidden" name="PatientID" value="<? echo "$id" ?>">
FirstName:<input type="text" name="FName" value="<? echo "$FName"?>"><br>
LastName: <input type="text" name="LName" value="<? echo "$LName"?>"><br>
Patient Phone: <input type="text" name="PatientPhone" value="<? echo "$PatientPhone"?>"><br>
Facility Name:<input type="text" name="FacName" value="<? echo "$FacName"?>"><br>
Facility Address: <input type="text" name="FacAddress" value="<? echo "$FacAddress"?>"><br>
Patient Room: <input type="text" name="PatRoom" value="<? echo "$PatRoom"?>"><br>
Facility City:<input type="text" name="FacCity" value="<? echo "$FacCity"?>"><br>
Facility State: <input type="text" name="FacState" value="<? echo "$FacState"?>"><br>
Facility Zip: <input type="text" name="FacZip" value="<? echo "$FacZip"?>"><br>
Facility Phone:<input type="text" name="FacPhone" value="<? echo "$FacPhone"?>"><br>
Caregiver Name: <input type="text" name="CaregiverName" value="<? echo "$CaregiverName"?>"><br>
Caregiver Phone: <input type="text" name="CaregiverContactPhone" value="<? echo "$CaregiverContactPhone"?>"><br>
Med Dispense Time1:<input type="text" name="MedDispenseTime1" value="<? echo "$MedDispenseTime1"?>"><br>
Med Dispense Time1:<input type="text" name="MedDispenseTime1" value="<? echo "$MedDispenseTime2"?>"><br>
Med Dispense Time1:<input type="text" name="MedDispenseTime1" value="<? echo "$MedDispenseTime3"?>"><br>
Med Dispense Time1:<input type="text" name="MedDispenseTime1" value="<? echo "$MedDispenseTime4"?>"><br>
Med Dispense Time1:<input type="text" name="MedDispenseTime1" value="<? echo "$MedDispenseTime5"?>"><br>
Med Dispense Time1:<input type="text" name="MedDispenseTime1" value="<? echo "$MedDispenseTime6"?>"><br>
Month: <input type="text" name="Month" value="<? echo "$Month"?>"><br>
Year: <input type="text" name="Year" value="<? echo "$Year"?>"><br>
<input type="Submit" value="Update">
</form>
</td></tr></table>
<?
++$i;
}
?>
</body>
</html>