Hey,
I have a long piece of code that I coded in one shot, not testing out each little bit of it. And now that I run it it doesn't do anything other then just give me a blank page?
The page load time gives the impression that it's trying to do something but can't?
<?php
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
include("http://surfall.be/top.php?ref=$ref");
print "<h1>Register</h1><p><center>";
$user = $_POST["user"];
$pass = $_POST["pass"];
$email = $_POST["email"];
$doono = $_POST["doono"];
$ref = $_POST["ref"];
include('mysql.php');
//Check if user already registered
$query = "SELECT user FROM users WHERE user = '$user'";
$result = mysql_query($query);
if (mysql_fetch_row($result))
{
Header("Location: http://surfall.be/join.php?ref=$ref&user=1");
exit;
}
//Check if doono is already registered
$query = "SELECT doono FROM users WHERE doono = '$doono'";
$result = mysql_query($query);
if (mysql_fetch_row($result))
{
Header("Location: http://surfall.be/join.php?ref=$ref&doono=1");
}
//Check if doono is banned
$query = "SELECT doono FROM banned WHERE doono = '$doono'";
$result = mysql_query($query);
if (mysql_fetch_row($result))
{
Header("Location: http://surfall.be/join.php?ref=$ref&doono=2");
}
//Check if email is already registered
$query = "SELECT email FROM users WHERE email = '$email'";
$result = mysql_query($query);
if (mysql_fetch_row($result))
{
Header("Location: http://surfall.be/join.php?ref=$ref&email=1");
}
//Check if email is banned
$query = "SELECT email FROM banned WHERE email = '$email'";
$result = mysql_query($query);
if (mysql_fetch_row($result))
{
Header("Location: http://surfall.be/join.php?ref=$ref&email=2");
}
If ($ref > 0)
{
mysql_query("INSERT INTO users(user, pass, email, doono, ref) VALUES('$user', '$pass', '$email', '$doono', '$ref')")
or die(mysql_error());
}
else {
mysql_query("INSERT INTO users(user, pass, email, doono) VALUES('$user', '$pass', '$email', '$doono')")
or die(mysql_error());
}
$numbers = Array(3jhkda,djqys7,koysk8,78hgsy,8hysjh,87hsyf,9juysh,ju7shg,uuhys6,koiys7,ysodty,yggft5,johys7,fhyd6a,ijyhza,bhdyas,bkhsya,7hdyas,mjdkis,kouasy);
srand((float)microtime() * 1000000);
shuffle($numbers);
// Your email address
$me = "admin@surfall.be";
// The subject
$subject = "$user surfall.be Registration";
// The message
$message = "
Welcome to the DoonoSurf.info community $user! \n
Registration details can be seen below: \n \n
ID: $id \n
Username: $user \n
Password: $pass \n
Doono ID: $doono \n
IP Address: GetHostByName($REMOTE_ADDR) \n
Surflink: <a href=\"http://surfall.be/surf.php?id=$id&email=$email\">http://doonosurf.info/surf.php?id=$id&email=$email</a> \n \n
Again, thanks for joining the community. \n If you have any question please use the contact form on the website. \n
surfall.be Admin \n \n
Please note that --THIS ISNT SPAM-- The user may delete their membership by simply logging in and clicking on \"delete\".
";
mail($email, $subject, $message, "From: $me");
print "Confirmation email has been sent to $email. You must activate your account before being able to login!<BR><BR>Thanks for joining!";
$time_end = microtime_float();
$time = round($time_end - $time_start, 4);
include ("http://surfall.be/footer.php?time=$time");
?>
Any ideas? :rolleyes: