Here are some details...
?php
$ref = $HTTP_REFERER;
$sql_hostname = "localhost";
$sql_username = "xxx";
$sql_password = "xxx";
$sql_database = "exx";
$exp = $_POST["pw"];
MYSQL_CONNECT($sql_hostname,$sql_username,$sql_password) or DIE("Unable to connect to database");
@MYSQL_SELECT_DB("$sql_database") or DIE("Unable to select database");
$query = "insert into presform(name,email,telephone,country,state,consultant,refcode,newtime,comments)
values
('$date','$name','$email','$telephone','$country','$state','$consultant','$refcode','$newtime','$comments')";
$result = mysql_query($query);
?>
I need to include in my mysql form, the users host ip (so I can track what advertising medium they have come from) plus the timestamp so I know the date the form was submitted.
Confused as the date is not part of the html form - what query do I run and where do I put it after POST? do I include it within the form values?
Where do I run the environment (host/IP) string?
Thanks for link. Hope this has provided you with more details.