Location: PHPKode > projects > Gatito Prediction League > gatito_pred_league/newacc.php
<? include "head.php";?>

<?
include "templates/connect_db.php";
include "templates/functions.inc.php";
@$LoginName=$HTTP_POST_VARS ['login'];
@$inp_password=$HTTP_POST_VARS ['pass'];
@$check_password=$HTTP_POST_VARS ['cpass'];
@$team=$HTTP_POST_VARS ['team'];
@$email=$HTTP_POST_VARS ['email'];
$mailpath = $_SERVER['HTTP_HOST'];
$query=mysql_query("SELECT * FROM teams");
while ($row =@ mysql_fetch_array($query)) { 
	@$teams .="<option value='$row[team]'>$row[team]</option>";};

if ($LoginName!="" AND $inp_password==$check_password) {
include "templates/connect_db.php";
$query=mysql_query("SELECT * FROM users WHERE username='admin'") or die (mysql_error());
while ($row =@ mysql_fetch_array($query)) { 
	@$cweek ="$row[week]";};
$inp_password=md5($inp_password);
mysql_query("INSERT INTO users values ('$LoginName','$inp_password','$email','$team','','0','$cweek','')") or die("<p> Username in use, <a href=newacc.php> try again</a></p>");
echo "<p>details entered, you will be able to login once you recieve confirmation email</p>";
mail($email, "Prediction league confirmation", "Please follow the link to complete your registration  http://".cwd()."/confirm.php?name=$LoginName","FROM:".ADMIN_EMAIL);}
 else 
{echo "<h2> Enter your Details </h2>
<form action='newacc.php' method='post' id='new_account'>verlaine
<p class='right'> username <input type='text' name='login' id='login'value='$LoginName'/><br/>
Password <input type='password' name='pass'id='pass' /><br/>
re-enter password<input type='password' name='cpass' id='cpass'/><br/>
team <select name='team'id='team'/>$teams</select>
<br/><br/>
e-mail <input type='text' name='email' id='email' value='$email'/><br/> 
<input type='submit' name='Submit' id='submit' value='Submit'/></p>
</form>";
if ($inp_password!=$check_password) {echo "<br><b>passwords don't match, please re-enter</b></p>";};};
 include "foot.html";?>


Return current item: Gatito Prediction League