Hey--
I've written some code here that doesn't seem to work... It's supposed to send an email near the end, it doesn't send it and it just gives my a blank page, as a response.
<?php
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
include("http://site.be/top.php?ref=$ref");
print "<h1>Register</h1><p><center>";
$user = $_POST["user"];
$pass = $_POST["pass"];
$email = $_POST["email"];
$doono = $_POST["doono"];
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://site.be/join.php?ref=$ref&user=1");
}
//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://site.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://site.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://site.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://site.be/join.php?ref=$ref&email=2");
}
mysql_query("INSERT INTO users(user, pass, email, doono, ref) VALUES($user, $pass, $email, $doono, $ref)")
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@site.info";
// The subject
$subject = "$user site.info Registration";
// The message
$message = "
Welcome to the site.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://site.info/surf.php?id=$id&email=$email\">Surflink</a> \n \n
Again, thanks for joining the community. \n If you have any question please use the contact form on the website. \n
site.info 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://site.be/footer.php?time=$time");
?>
But the code looks good to me?