Please correct my syntax:
im including a file with the following constants
define('IPADDRESS', $_SERVER['REMOTE_ADDR'] );
define('BROWSER', @$HTTP_USER_AGENT );
define('REFERER', @$HTTP_REFERER );
if i echo IPADDRESS; i get the ip address (127.0.2) so the include is fine.
My mysql instruction is as follows:
$update = mysql_query("UPDATE login_errors SET tries = '$addtry' WHERE ip_address = 'IPADDRESS' ") or die(mysql_error());
The above inserts the value IPADDRESS into the database!
I have also tried the following but no success:
$update = mysql_query("UPDATE login_errors SET tries = '$addtry' WHERE ip_address =". IPADDRESS. ")" or die(mysql_error());
What have i done wrong? first time im using constants in mysql_query.
I also have the following questions if you have time,
1. ive seen syntax like "something::something", i cant find anything for "::" under php operators
2. the function session_set_save_handler(), does it store in a database on the server or on the clients machine? as this always seems to be an advised solution if cookies are disabled on the clients machine