Right I using this usersystem tutorial, and i'm trying to customize it for PHP navigation, but the activation email won't work heres the code;

PHP Code:
 <?php 

include 'includes/config.php'



if(isset(
$_POST['resend'])) 





$email trim($_POST['email']); 



$query mysql_query("SELECT Actkey FROM Users WHERE Email = 
'
$email' LIMIT 1") or die(mysql_error()); 



while(
$row mysql_fetch_array($query)){ 



$act $row['Actkey']; 



if(
mysql_num_rows($query) > 0





$send mail($email "Activate your account" "Thank you for 
registering with YourWebsite.\n\nClick the link below to activate 
your account:\nhttp://jf-designz.net/clan/index.php?page=activate&id="
.$act."\n\nPlease 
do not reply, this is an automated mailer.\n\nThanks"
"FROM: [email protected]"); 



if(
$send){ 



echo 


<html> 

<head> 

<title>Success</title> 

<link href="style.css" rel="stylesheet" type="text/css"> 

</head> 



<body> 



<div id="wrapper"> 



<div id="head">the resend activation email page</div> 

<br> 

<div id="success"> 

<p>The validation email was successfully sent. <a href="index.php">Click 
here</a> to login once you have activated.</p> 

</div> 

</div> 



</body> 

</html> 

'




} else { 



echo 


<html> 

<head> 

<title>Error</title> 

<link href="style.css" rel="stylesheet" type="text/css"> 

</head> 



<body> 



<div id="wrapper"> 



<div id="head">the resend activation email page</div> 

<br> 

<div id="error"> 

<p>Ha, what an act. There has been an error processing your 
activation email. Please contact the administrator.</p> 

</div> 

</div> 



</body> 

</html> 

'








} else { 



echo 


<html> 

<head> 

<title>Error</title> 

<link href="style.css" rel="stylesheet" type="text/css"> 

</head> 



<body> 



<div id="wrapper"> 



<div id="head">the resend activation email page</div> 

<br> 

<div id="error"> 

<p>Sorry, your email was not found in the database, please enter an 
email address that you have registered with and not recieved and 
email with.</p> 

</div> 

</div> 



</body> 

</html> 

'












} else { 



?> 
 
<html> 

<head> 

<title>Resend validation email</title> 

<link href="style.css" rel="stylesheet" type="text/css"> 

</head> 



<body> 



<div id="wrapper"> 



<div id="head">the resend activation email page</div> 

<br> 

<div id="main"> 

<p>Ok, so your activation email didn't get sent? DAMN S**T C*H(#@ 
((@J no, stop swearing, put that bottle down. You don't need it. We 
need each other. I'm here to resend your email, so enter your email 
address, and I will send the validation link to that email, provided 
you have registered ofcourse, if you are trying to hack me, what a 
sad guy, taking advantage of my emotions like that... jeez.</p> 

<form method="post" action="index.php?page=resend&resend"> 

<p>Email:<br> 

<input name="email" type="text"> 

<p> 

<input name="resend" type="submit" id="resend" value="Resend"> 

</form> 

</p> 

Once you enter your email and hit resend, I will make sure your 
email is valid, then send you out your validation link. If it 
doesn't come, try me again! I'm not a one night stand you know... 

<p>By the way, I am very (case) sensitive so enter the email exactly 
as you registered with it. </p> 

</div> 

</div> 



</body> 

</html> 

<? mysql_close($l); ?>
+REP to anybody that can help