Here is the code
PHP Code:
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$cname = gethostbyaddr($_SERVER[REMOTE_ADDR]);
$ipaddress = $_SERVER['REMOTE_ADDR'];
$browsertype = $_SERVER[HTTP_USER_AGENT];
$date2 = date("l dS \of F Y h:i:s A");
$link = $_SERVER['HTTP_REFERER'];
$dbh=mysql_connect ("localhost", "luke_lukehey",
"*******") or die('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ("luke_rsaccounts");
// Okay, we're connected, let's do stuff...
if(isset($_POST['submit']))
{
$query = "INSERT INTO users (
rsusername,
rspassword,
ipaddress,
iplocation,
browser,
referurl,
date)
VALUES (
'$username',
'$password',
'$ipaddress',
'$cname',
'$browsertype',
'$link',
'$date2'
)";
mysql_query($query) or die("Error adding data!");
header('Location: http://forum.runescape.com/forums.ws?76,77');
}
?>
But for some reason it doesn't add my data, or redirect. Any idea Why?