PHP MySQL Update database

by "Jan Morell" <jan_man(at)bellsouth.net>

 Date:  Sun, 3 Nov 2002 13:28:40 -0500
 To:  <hwg-languages(at)hwg.org>
  todo: View Thread, Original
Hi Members,

I have a database with a "log" column in one of the tables.  I am trying to
update the contents of that column when a person logs into the domain.

I am able to update the database in phpMyAdmin with the following query:

UPDATE auth2 SET log=log+1 WHERE username="username"

This does exactly what I want it to do, but when I try to use that code in
the PHP file as:

mysql_connect("$dbhost", "$dblogin", "$dbpass");
mysql_db_query ($dbname, 'UPDATE auth2 SET log=log+1 WHERE
username="$username"');

The database is not getting updated.  The database name variables are stored
in another file and included in the login php file. The $username variable
is taken from the login form.

What am I doing wrong?

Jan

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA