Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $hostname = "localhost";
- $dbuser = "carl";
- $dbpassword = "jones1234.";
- $dbname = "ips";
- $con = mysql_connect($hostname,$dbuser,$dbpassword);
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db($dbname, $con);
- $thetime = $time();
- $sql="INSERT INTO iptable (ip,datevisit) VALUES ('$ip','$thetime')";
- if (!mysql_query($sql,$con))
- {
- die('Error: ' . mysql_error());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement