$dataa = "SELECT * FROM `patient_data` WHERE `pid` = 6";
$sqquery = mysql_query($dataa);
$data1 = mysql_fetch_array($sqquery);
$dataaa= $data1['lname'];
I am trying to get the value from a field on another table, not the table the form created.
When entering in the $pid variable as the second paramter, I am successfully able to fill the form with the number ‘6’
When assigning $dataaa to a string, I am able to populate the field. So I assume there must be something wrong with the sql query or the connection to the database.
Is the connection to the database always open or will i have to do a mysql_connect();?
Using: sqlQuery():
``
$dataaa = sqlQuery(“SELECT lname FROM patient_data WHERE pid = 6”);
If there are no other replies, would suggest Layout Based Visit Form or CAMOS for the clinical note, especially if if you need only 2-3 fields.
Building a form with XMLFormGen is less efficient than using the pre-built LBV, which requires no coding skills to modify. The only thing a user cannot do in a LBV form is draw.