N> <?php
N> $code = mysql_query("SELECT password FROM newsauthors WHERE $name = author");
?>>
You're not extracting a result here, just executing the query
(assuming you have succesfully created the connection to the db at
some other point in your code).
Look up mysql_result() (and others in the family) in the PHP Manual.
N> <?php
N> if ($code = $password) {
When you do extract a result, and you're trying to compare it, you'll
want == and not = to do the comparison.
If you need more information, look under "Operators" in the PHP
Manual.
You might also want to think about not storing plaintext passwords in
your db, but instead hashing the passwords using the password()
function in MySQL, then comparing the hashed input password against
the hash stored in the table.
Mmm...hash.
- Julie
Julie Meloni
[EMAIL PROTECTED]
"PHP Essentials" & "PHP Fast & Easy"
--- www.thickbook.com ---
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]