Hi,
I have just started developing my basis for a new web app, i am trying to get my database communication spot on, however, I am having some problems!
I am using AdoDB Lite as an abstraction layer, and I am trying to get my login page working.
i have a file (database.php) which creates the connection like so:
$db = ADONewConnection('mysql');
$result = $db->PConnect($dbHost, $dbUser, $dbPassword, $dbName);
My login script tries to tap into the DB and insert a challenge row like so:
$challenge = md5(session_id() . time () . rand ());
$query = "INSERT INTO `loginchallenges` ( `challenge` , `session_id` , `timestamp` ) VALUES ('" . $challenge . "', '" .session_id() ." ', NOW());";
$sql = $db->execute($query);
When I run this the record doesn't get into the database. I have tried dberror etc however i just get Error(): - not very helpful! The SQL is valid as it runs against phpMYAdmin and mysql.exe fine. Any ideas? Does anyone know of any tutorials - the documentation is really lacking for what I have heard is a great package?
Cheers and Happy Christmas,
Tom