Dear list -
SEE CORRECTION IN $_POST VARIABLE BELOW.
Thanks to all for your help.
I hope [??] that this question will solve all the remaining problems.
So that we are on the same page, here is what was previously stated.
mysqli_stmt_bind_param expects three variables, in this order ----
mysqli_stmt_bind_param($stmt, "num", $a, $b, $c)
Where stmt is the query w/ the ?? that is
SELECT Site, MedRec, Fname, Lname, Phone, Height, Sex, Hx, Bday, Age
FROM Intake3 where 1 AND (Site = ?) AND (MedRec = ?) AND (Sex = ?)
and num is the number and type of variables is the query, in this
$a $b and $c are the variables to be inserted, in this case:
$a = $_POST['Site'];
$b = $_POST['MedRec'];
$c = $_POST['Sex'];
As I seem to have found, the variables cannot be a string or components
of an imploded array.
This is a search function that will take patient supplied data and
search the Intake database to determine the Medical Record Number.
There are nine variables in the database, and I never know which
variables the patient will give.
Based on the database, it is easy to set up the correspondence. The
database is searched in the order of the correspondence and the letters
$a = $_POST['Site']
$b = $_POST['MedRec']
$c = $_POST['Fname']
$d = $_POST['Lname']
$e = $_POST['Phone']
$f = $_POST[Height']
$g = $_POST['Sex']
$h = $_POST['Hx']
$i = $_POST['Bday']
$i = $_POST['Age'] <----- Corrected
The challenge is to be able to dynamically select the variables that
will go intomysqli_stmt_bind_param.
Advice and help, please
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php