tanhaha_how
01-13-2007, 04:38 PM
hi,i jz want to ask how to get the value with diff page....
include 'connStr.php';
$query ="";
if ($_POST["actionMode"]=="Create"){
$upperSex = strtoupper($_POST["Sex"]);
$query = "Insert into tblpatient('', Treatment_Date, Name, Sex, ICNO, Age, DOB, Address, Postcode, Race, Language_Spoken, Telephone_house, Telephone_office, Handphone, Allergy, Email)values('".$_POST["Patient_ID"]."', '".$date1."', '".$_POST["nam"]."', '".$upperSex."', '".$_POST["ICNO"]."', '".$_POST["Age"]."', '".$date."', '".$_POST["Address"]."', '".$_POST["Postcode"]."', '".$_POST["Race"]."', '".$_POST["Language_Spoken"]."', '".$_POST["Telephone_house"]."', '".$_POST["Telephone_office"]."', '".$_POST["Handphone"]."', '".$_POST["Allergy"]."', '".$_POST["Email"]."');";
$result = mysql_query($query);
$patientID = mysql_insert_id()
mysql_query("COMMIT");
}
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">";
echo "<meta http-equiv=\"REFRESH\" content=\"0; URL=patientRecords.php\">";
in another form,how to get this $patientID???
actually i want to display the auto_increment value....but dunno y cant get the next patient ID.....help me pls...
thanks a lot:)
include 'connStr.php';
$query ="";
if ($_POST["actionMode"]=="Create"){
$upperSex = strtoupper($_POST["Sex"]);
$query = "Insert into tblpatient('', Treatment_Date, Name, Sex, ICNO, Age, DOB, Address, Postcode, Race, Language_Spoken, Telephone_house, Telephone_office, Handphone, Allergy, Email)values('".$_POST["Patient_ID"]."', '".$date1."', '".$_POST["nam"]."', '".$upperSex."', '".$_POST["ICNO"]."', '".$_POST["Age"]."', '".$date."', '".$_POST["Address"]."', '".$_POST["Postcode"]."', '".$_POST["Race"]."', '".$_POST["Language_Spoken"]."', '".$_POST["Telephone_house"]."', '".$_POST["Telephone_office"]."', '".$_POST["Handphone"]."', '".$_POST["Allergy"]."', '".$_POST["Email"]."');";
$result = mysql_query($query);
$patientID = mysql_insert_id()
mysql_query("COMMIT");
}
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">";
echo "<meta http-equiv=\"REFRESH\" content=\"0; URL=patientRecords.php\">";
in another form,how to get this $patientID???
actually i want to display the auto_increment value....but dunno y cant get the next patient ID.....help me pls...
thanks a lot:)