Posted by Garry Jones on 10/08/06 15:30
I want to Select a field based upon the number the user keys in I want to
retrieve another field from the same record
This is not working. How do I do it? The tricky bit seems to me to be
putting the variavble in the select quotes.
$scfchknum=$_POST['scfchknum'];
(inlogging mysql)
$upgcollect='SELECT scfpwd1 FROM scfmforening WHERE scfmnum = $scfchknum';
(logout mysql)
$pwd1=mysql_query($upgcollect);
mysql_close();
echo $pwd1;
$scfchknum is the value of the variable assign to user input
scfmforening is the name of the table
scfmnum is the name of the field I want to search in
scfpwd1 is name of the field I want to retreive from
$upgcollect is the data before it is processed with query
$pwd1 is the data after it is processed.
Greatful for any help.
Garry Jones
Sweden
Navigation:
[Reply to this message]
|