Need help retreiving one record

From: Date: Wed, 07 Jan 2004 01:42:16 +0000
Subject: Need help retreiving one record
Groups: php.db 
Request: Send a blank email to php-db+get-32306@lists.php.net to get a copy of this message
I'm studying PHP now woth this manual, but it's rather fuzzy on how to show data on screen obtained from a database, or how to assign a value of one record of the database to a variable I can use in my script. Concrete, this is the case: I would like to be able to assign to the variable $TruePassword the value found in colomn Password at row $EneteredName, so I can compare it to the password ppl enter when logging in. I hope this makes sense, if not please ask what I forgot to mention or what I was unclear about. Thanks beforehand, Ondoron Bondoon btw, this is what I tried... <?php $Host="localhost"; $Username="adminsithlore"; $DBName="adminsithlore_uk_db"; $Tablename="Login"; $Connection = mysql_connect ($Host, $Username); $Mission= "select Password from $Tablename where (Name=\"Ondoron Bondoon\")"; $Result= mysql_db_query($DBName, $Mission, $Connection); if ($Result) { print ("$Result"); } print("<br/> $tryname, $trypassword"); mysql_close ($Connection); ?>

« previous php.db (#32306) next »