File size: 2.56Kb
<?php
session_name("PHPSESSID");
session_start();
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
echo "<head><title>Registering</title>";
echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
<meta name=\"description\" content=\"wapirate.net Chatheaven :)\">
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\"></head>";
echo "<body>";
?>
<wml>
<p align="center">
<?php
$uid=$_POST["uid"];
$pwd=$_POST["pwd"];
$cpwd=$_POST["cpwd"];
include("func.php");
include("conf.php");
connect($dbserver,$dbname,$dbuser,$dbpass);
echo "<img src=\"logo.gif\" alt=\"wapirate.net\"/><br/><br/>";
if ($pwd==$cpwd) {
$errn = register($uid,$pwd);
if($errn == 0)
{
echo "Registration completed successfully<br/>";
echo "<a href=\"index.php?action=login\">Log in</a>";
}else{
if($errn == 1)
{
echo "This UserID is already taken, please choose a different one";
}
else if($errn == 2)
{
echo "Please fill in the password fields";
}
else if($errn == 3)
{
echo "You can't use this userid";
}
else if($errn == 4)
{
echo "UserID should not contain spaces";
}
else if($errn == 5)
{
echo "Password should not contain spaces";
}
else if($errn == 6)
{
echo "Can't register at the moment, please try again later!";
}
else if($errn == 7)
{
echo "You can't use uppercase or special characters in UserID and password!";
}
else if($errn == 8)
{
echo "The password and the UserID should contain at least 4 characters";
}
else if($errn == 9)
{
echo "UserID must begin with a letter";
}/*
else if($_POST['auth']!=$_SESSION['captchaAuth']){
echo 'Incorrect code, try again. Note: cAsE SenSITivE VaLUE!<br/>';
}*/
}
} else {
echo "Passwords did not match!";
}
echo "<br/><br/>";
echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
?>
</p>
</body>
</html>