Need help retreiving one record

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
?>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux