...

View Full Version : how to get the value???



tanhaha_how
01-03-2007, 05:29 PM
hi everyone,i have a problem regarding how to get the value from database....



<?php

$query = "Select Patient_ID from tblpatient where Patient_ID='".$_POST["Patient_ID"]."' order by Patient_ID desc limit 1;";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
// echo $_POST['Patient_ID'];
$newPatientID = $_POST["Patient_ID"] + 1;

?>

i know my code is sth wrong dee....can anyone help me pls????
thank u very much:thumbsup:

whizard
01-03-2007, 06:34 PM
Try taking out the highlighted apostrophe....


$query = "Select Patient_ID from tblpatient where Patient_ID='".$_POST["Patient_ID"]."' order by Patient_ID desc limit 1;";

Dan

tanhaha_how
01-04-2007, 10:25 AM
but the result is still the same....actually i'm doing a form which is to add patient record.....then the patient ID is auto increment....so i need to display the previous patient ID + 1 inside the textbox....:o

so what should i do???thank u veru much



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum