Beste CP,
Aangezien ik geen errors te zien krijg, maar alles gewoon wit op de pagina...
Aan wat kan dat liggen en hoe zie je dat het snelst?
dmv een error_reporting(E_ALL) is er ook niks te zien...
Beste CP,
Aangezien ik geen errors te zien krijg, maar alles gewoon wit op de pagina...
Aan wat kan dat liggen en hoe zie je dat het snelst?
dmv een error_reporting(E_ALL) is er ook niks te zien...
misschien handig om je script te plaatsen? (index.php)
http://www.phphulp.nl/php/tutorials/8/575/1491/
lees dat door en maak het .htaccess bestand aan waar ze het over hebben...
Als je een witte pagina krijgt betekent dit meestal dat er iets niet klopt in je script, bv. een <?php of ?> vergeten e.d.
CitaatAls je een witte pagina krijgt betekent dit meestal dat er iets niet klopt in je script, bv. een <?php of ?> vergeten e.d.
Ik was idd een ?> tag vergeten, maar verder geeft het nog steeds niks weer, ook de tingy wat Darsstar zei, werkt niet, ik krijg helemaal geen errors...
vage shit...
?> hoeft niet..
Geef je script eens.
Post u script hier is aub.!!
<?php /* ------------------------- */
error_reporting(E_ALL);
include("config.php");
if(check_login()) {
print <<<ENDHTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="indexstyle3.css" rel="stylesheet" type="text/css">
<base target="main" />
</head>
<table align=center width=630>
<tr><td class=subTitle><b>Logged in</b></td></tr>
<tr><td class=mainTxt>
You're already logged in!
</table></td>
</tr>
ENDHTML;
mysql_query("DELETE FROM `[online]` WHERE `login`='".$_COOKIE['login']."' AND `validate`='".$_COOKIE['validate']."' AND `IP`='".$_SERVER['REMOTE_ADDR']."'") or die(mysql_error());
setcookie("login",'',time()-24*60*60,"/","");
setcookie("validate",'',time()-24*60*60,"/","");
unset($_SESSION['login']);
unset($_SESSION['IP']);
unset($_SESSION['data']);
print <<<ENDHTML
</table>
</body>
</html>
ENDHTML;
exit;
}
$login = $_POST['login'];
$name = $_POST['name'];
$age = $_POST['age'];
$city = $_POST['stad'];
$email = $_POST['email'];
$recruiter = $_POST['recruiter'];
$sex = $_POST['sex'];
$IP = $_SERVER['REMOTE_ADDR'];
${"select$sex"} = "selected";
if(isset($_POST['submit'])) {
$message = Array(
"Username only valid with A-Z, a-z",
"Use a valid email adress",
"Username already used",
"E-mail already used",
"Refferal username only valid with A-Z, a-z",
"No name given",
"No age given",
"Select you're Gender",
"An account already in use on this PC!");
$msgnum = -1;
if(preg_match('/^[a-zA-Z]+$/',$login) == 0)
$msgnum = 0;
if(preg_match('/^[a-zA-Z]+$/',$name) == 0)
$msgnum = 5;
if(preg_match('/^[a-zA-Z]+$/',$age) == 0)
$msgnum = 6;
if(preg_match('/^.+@.+..+$/',$email) == 0)
$msgnum = 1;
if($sex != 1 && $sex != 2)
$msgnum = 7;
else {
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `login`='".$login."'") or die(mysql_error());
if(mysql_num_rows($dbres) > 0)
$msgnum = 2;
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `email`='".$email."'") or die(mysql_error());
if(mysql_num_rows($dbres) > 0)
$msgnum = 3;
if(preg_match('/^[a-zA-Z0-9_-]+$/',$login) == 0)
$msgnum = 4;
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `IP`='".$IP."'") or die(mysql_error());
if(mysql_num_rows($dbres) > 0)
$msgnum = 8;
if($msgnum == -1) {
$rand1 = rand(11,62);
$rand2 = rand(62,999);
$rand3 = rand(11,62);
$rand4 = rand(11,62);
$rand5 = rand(62,999);
$pass = "{$rand1}{$rand2}{$rand3}{$rand4}{$rand5}{$rand6}";
$pass = preg_replace('/11/',"a",$pass);
$pass = preg_replace('/12/',"b",$pass);
$pass = preg_replace('/13/',"c",$pass);
$pass = preg_replace('/14/',"d",$pass);
$pass = preg_replace('/15/',"e",$pass);
$pass = preg_replace('/16/',"f",$pass);
$pass = preg_replace('/17/',"g",$pass);
$pass = preg_replace('/18/',"h",$pass);
$pass = preg_replace('/19/',"i",$pass);
$pass = preg_replace('/20/',"j",$pass);
$pass = preg_replace('/21/',"k",$pass);
$pass = preg_replace('/22/',"l",$pass);
$pass = preg_replace('/23/',"m",$pass);
$pass = preg_replace('/24/',"n",$pass);
$pass = preg_replace('/25/',"o",$pass);
$pass = preg_replace('/26/',"p",$pass);
$pass = preg_replace('/27/',"q",$pass);
$pass = preg_replace('/28/',"r",$pass);
$pass = preg_replace('/29/',"s",$pass);
$pass = preg_replace('/30/',"t",$pass);
$pass = preg_replace('/31/',"u",$pass);
$pass = preg_replace('/32/',"v",$pass);
$pass = preg_replace('/33/',"w",$pass);
$pass = preg_replace('/34/',"x",$pass);
$pass = preg_replace('/35/',"y",$pass);
$pass = preg_replace('/36/',"z",$pass);
$pass = preg_replace('/37/',"A",$pass);
$pass = preg_replace('/38/',"B",$pass);
$pass = preg_replace('/39/',"C",$pass);
$pass = preg_replace('/40/',"D",$pass);
$pass = preg_replace('/41/',"E",$pass);
$pass = preg_replace('/42/',"F",$pass);
$pass = preg_replace('/43/',"Q",$pass);
$pass = preg_replace('/44/',"H",$pass);
$pass = preg_replace('/45/',"I",$pass);
$pass = preg_replace('/46/',"J",$pass);
$pass = preg_replace('/47/',"K",$pass);
$pass = preg_replace('/48/',"L",$pass);
$pass = preg_replace('/49/',"M",$pass);
$pass = preg_replace('/50/',"N",$pass);
$pass = preg_replace('/51/',"O",$pass);
$pass = preg_replace('/52/',"P",$pass);
$pass = preg_replace('/53/',"Q",$pass);
$pass = preg_replace('/54/',"R",$pass);
$pass = preg_replace('/55/',"S",$pass);
$pass = preg_replace('/56/',"T",$pass);
$pass = preg_replace('/57/',"U",$pass);
$pass = preg_replace('/58/',"V",$pass);
$pass = preg_replace('/59/',"W",$pass);
$pass = preg_replace('/60/',"X",$pass);
$pass = preg_replace('/61/',"Y",$pass);
$pass = preg_replace('/62/',"Z",$pass);
$land1 = Array("","New York","Oklahoma","Missouri","Taxas","Lowa","Colorado","Kenya","Congo","Mississippi","");
$land = $land1[$city];
$code = rand(100000,999999);
mysql_query("UPDATE `[users]` SET `recruits`=`recruits`+'1' WHERE `login`='".$recruiter."'") or die(mysql_error());
mysql_query("UPDATE `[users]` SET `cash`=`cash`+'10000' WHERE `login`='".$recruiter."'") or die(mysql_error());
mysql_query("INSERT INTO `[users]`(signup,login,name,age,pass,IP,email,land,sex) values(NOW(),'$login','$name','$age',MD5('$pass'),'$IP','$email','$city',$sex)") or die(mysql_error());
mysql_query("INSERT INTO `[temp]`(login,IP,code,area,time) values('$login','$IP',$code,'signup',NOW())") or die(mysql_error());
$id = mysql_insert_id();
mail($email,"Westerbase.com registration","You're account has been made on Westerbase.com.
We ask you to verify the following information if they are correct:
---------------------------------
User information:
Login = $login
E-mail address = $email
Password = $pass
Referer = $recruiter (Geen)
Country = $land
---------------------------------
Personal information:
Name = $name
Age = $age
Gender = $sex
---------------------------------
We made a special password for you.
With the password you can login in the game.
We recommend you to change this password.
Regards,,
Westerbase Team.
www.westerbase.com","From: Westerbase.com <[email protected]>n");
}
}
}
/* ------------------------- */
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body background="#333333" text="#FFFFFF" link="#999999" vlink="#999999" alink="#999999" topmargin="0">
<?
if(isset($_GET['v']) && ($_GET['v'] == 1 || $_GET['v'] == 2 || $_GET['v'] == 3)) {
setcookie("v",$_GET['v'],time()+24*60*60*365,"/","");
$_COOKIE['v'] = $_GET['v'];
}
if($_COOKIE['v'] == '3') {
include("style3.php");
} else
if($_COOKIE['v'] == '2') {
include("style2.php");
} else
if($_COOKIE['v'] == '1') {
include("style1.php");
} else
include("style1.php");
?>
<base target="main" />
</head>
<table align=center width=630>
<tr><td class=subTitle><b>Register</b></td></tr>
<tr><td class=mainTxt>
<?php /* ------------------------- */
if(isset($_GET['id'],$_GET['code'])) {
echo " <tr><td class="subTitle"><b>Activation</b></td></tr>n";
$id = $_GET['id'];
$code = $_GET['code'];
$IP = $_SERVER['REMOTE_ADDR'];
$dbres = mysql_query("SELECT `login` FROM `[temp]` WHERE `area`='signup' AND `id`='$id' AND `code`='$code'") or die(mysql_error());
if($data = mysql_fetch_object($dbres)) {
$acti = 1;
mysql_query("UPDATE `[users]` SET `activated`=1,`signup`=NOW() WHERE `login`='".$login."'") or die(mysql_error());
mysql_query("DELETE FROM `[temp]` WHERE `id`='".$id."'") or die(mysql_error());
echo " <tr><td class="mainTxt">Activation succesful</td></tr>n";
}
else
echo " <tr><td class="mainTxt">Incorrect activation-code...</td></tr>n";
}
else {
if($msgnum != -1) {
if(isset($msgnum) && $msgnum != -1)
echo "{$message[$msgnum]}n";
$rec = $_GET['rec'];
print <<<ENDHTML
<form method="post"><table>
<tr><td width=100>Ip:</td> <td><input type="text" name="login" disabled maxlength=16 style="width: 150;" value="$IP"></td></tr>
<tr><td width=100>Name: <font color=red>*</font></td> <td><input type="text" name="name" maxlength=16 style="width: 150;" value="$name"></td></tr>
<tr><td width=100>Age: <font color=red>*</font></td> <td><input type="text" name="age" maxlength=16 style="width: 150;" value="$age"></td></tr>
<tr><td width=100>Gender: <font color=red>*</font></td> <td><select name="sex" style="width: 150;">
<option value="1" $select1>Male</option>
<option value="2" $select2>Female</option>
</select>
<tr><td width=105>Username: <font color=red>*</font></td> <td><input type="text" name="login" maxlength=16 style="width: 150;" value="$login"></td></tr>
<tr><td width=100>E-Mail address: <font color=red>*</font></td> <td><input type="text" name="email" maxlength=64 style="width: 150;" value="$email"><br><font color=yellow>Password will be sent to the email address!</font></td></tr></td></tr>
<tr><td width=100>Land: <font color=red>*</font></td> <td><select name="stad" style="width: 150;">
<option value="1">New York</option>
<option value="2">Oklahoma</option>
<option value="3">Missouri</option>
<option value="4">Texas</option>
<option value="5">Lowa</option>
<option value="6">Colorado</option>
<option value="7">Kenya</option>
<option value="8">Congo</option>
<option value="9">Mississippi</option>
</select></td></tr>
<tr><td width=100>Referer:</td> <td><input type="text" disabled name="recruiter" maxlength=64 style="width: 150;" value="$rec"></td></tr>
<tr><td colspan="2"><input type="checkbox" name="check1" value="1">I do not make more acounts till these is dead</td></tr>
<tr><td colspan="2"><input type="checkbox" name="check2" value="1">I will not express in terms of unnecessary things are</td></tr>
<tr><td colspan="2">You will receive a e-mail with a password.</td></tr>
<tr><td></td><td align="center"><input type="submit" name="submit" style="width: 100;" value="Register"></td></tr>
</table></form><br>
ENDHTML;
}
else
echo " <tr><td class="mainTxt">Congratulations.<br><br>
You are now registered on Westerbase, we have sended you a E-mail ($email) with you're password and other account information.<br><br>";
}
/* ------------------------- */ ?>
</table></td>
</tr>
</body>
?>
</html>
Toon Meer
Qua print <<<ENDHTML en ENDHTML; weet ik zo even verder niks anders op, want anders krijg ik parse errors voor '<'
Heb je nog geen account? Registreer je nu en word deel van onze community!