Daniel Brown wrote:
First and foremost, it's a VERY BAD idea to use root for MySQL.
If your code isn't perfect (and even sometimes if it is), arbitrary
commands and SQL injection attacks could lead to migraines that no
Tylenol will ever be able to alleviate.
I changed the user I was connecting as in order to post. I don't use
root in the real code.
Secondly, what error is the CLI kicking out when you run it from
the command line?
It doesn't give an error. The only thing it does is continue on through
the IF statement, which goes nowhere. I have added an ELSE to the
script and run it. It ends up running the code in the ELSE.
$login = date('m\-d\-Y');
if ($logout = $mysqli->prepare("UPDATE `mydb`.`authlog` SET
`logout` = ? WHERE `login` LIKE '$login%'")) { // <--- Will not
go any further than here, even when hard coding the information.
$logout->bind_param("s", date('m\-d\-Y\TH\:i\:s'));
$logout->execute();
$logout->close();
}
--
Nathaniel Hall, GSEC GCFW GCIA GCIH GCFA
Spider Security
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php