Stugister
Ik werk voor school aan een studenteregister en de registratiepagina wil maar niet werken... En ik kan de fout echt neit vinden!
Iemand die kan kijken?
VOorbeeld: http://stugister.jorandesign.nl/registreren.php
Als je gegevens in heb gevuld stuurd hij ze niet naar de database...
Registreren.php :
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
ini_set('display_errors', 'On'); // error reporting aan
error_reporting(E_ALL);
if(isset($_SESSION['gebruiker'])) {
header("Location: ingelogged.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Stugister - Registreren.</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="Fancy Sliding Form with jQuery" />
<meta name="keywords" content="jquery, form, sliding, usability, css3, validation, javascript"/>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="sliding.form.js"></script>
</head>
<body>
<div id="bg">
<div id="content">
<h1>Stugister Registratieformulier</h1>
<div id="wrapper">
<?php
include('config.php');
if($cfg['cronjobs'] != 1) {
include('cronjobs.php');
}
if($_SERVER["REQUEST_METHOD"] == "POST"){
$error = array();
if(!check_email($_POST['email'])) {
$error[] = 'Er is geen geldig e-mailadres ingevuld.';
}
if($_POST['gebruikersnaam'] == "") {
$error[] = 'Er is geen gebruikersnaam ingevuld.';
}
if(!preg_match("/^[-_0-9a-z]{2,}$/i", $_POST['gebruikersnaam'])) { // Thx to FangorN for this check :]
$error[] = 'Een gebruikersnaam mag slechts alfanummerieke tekens bevatten (a-z, 0-9), underscore (_) of liggend streepje (-).';
}
if($_POST['wachtwoord'] == "") {
$error[] = 'Er is geen wachtwoord ingevuld.';
}
if(geregistreerd($_POST['gebruikersnaam'],gebruikersnaam)) {
$error[] = '<strong>'.$_POST['gebruikersnaam'].'</strong> is reeds geregistreerd.';
}
if(geregistreerd($_POST['email'],email)) {
$error[] = '<strong>'.$_POST['email'].'</strong> is reeds geregistreerd. Slechts één account per e-mailadres is toegestaan.';
}
$fouten = sizeof($error);
if($fouten != 0) {
echo 'Er kon geen account worden aangemaakt omwille van de volgende reden(en):';
echo '<ul>';
for($i = 0; $i < $fouten; $i++) {
echo '<li>'.$error[$i].'</li>';
}
echo '</ul>';
} else {
$activatiecode = activatiecode($cfg['act_lengte']);
$tpl = new TemplatePower('mail.tpl');
$tpl->prepare();
$tpl->assign(array(
"site" => $cfg['site'],
"url" => $cfg['url'],
"gebruikersnaam" => $_POST['gebruikersnaam'],
"wachtwoord" => $_POST['wachtwoord'],
"code" => $activatiecode
));
$template = $tpl->getOutputContent();
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: ".$cfg['site']." <".$cfg['email'].">\n";
mail($_POST['email'],"Account op ".$cfg['site']." activeren",$template,$headers);
$gebruikersnaam = $_POST['gebruikersnaam'];
$wachtwoord = $_POST['wachtwoord'];
$email = $_POST['email'];
$naam = $_POST['naam'];
$plaatsnaam = $_POST['plaatsnaam'];
$telefoon = $_POST['telefoon'];
mysql_query("INSERT INTO leden_temp (gebruikersnaam,wachtwoord,datum,email,code,naam,plaatsnaam,telefoon) VALUES ('".$gebruikersnaam."','".md5($wachtwoord)."','".time()."','".$email."','".$activatiecode."','".$naam."','".$plaatsnaam."','".$telefoon."')");
?>
<form id="formElem" name="formElem" action="" method="post">
<fieldset class="step">
<legend>Voltooien</legend>
<p>
Je account is tijdelijk geregistreerd. Controleer nu je mailbox, binnen enkele ogenblikken zal er een activatiemail arriveren.<br /><strong>Attentie Hotmail-gebruikers:</strong> Kijk ook bij "Ongewenste post"!!
</p>
<p class="submit">
</p>
</fieldset>
</form>
<?php
}
} else { ?>
?>
ini_set('display_errors', 'On'); // error reporting aan
error_reporting(E_ALL);
if(isset($_SESSION['gebruiker'])) {
header("Location: ingelogged.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Stugister - Registreren.</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="Fancy Sliding Form with jQuery" />
<meta name="keywords" content="jquery, form, sliding, usability, css3, validation, javascript"/>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="sliding.form.js"></script>
</head>
<body>
<div id="bg">
<div id="content">
<h1>Stugister Registratieformulier</h1>
<div id="wrapper">
<?php
include('config.php');
if($cfg['cronjobs'] != 1) {
include('cronjobs.php');
}
if($_SERVER["REQUEST_METHOD"] == "POST"){
$error = array();
if(!check_email($_POST['email'])) {
$error[] = 'Er is geen geldig e-mailadres ingevuld.';
}
if($_POST['gebruikersnaam'] == "") {
$error[] = 'Er is geen gebruikersnaam ingevuld.';
}
if(!preg_match("/^[-_0-9a-z]{2,}$/i", $_POST['gebruikersnaam'])) { // Thx to FangorN for this check :]
$error[] = 'Een gebruikersnaam mag slechts alfanummerieke tekens bevatten (a-z, 0-9), underscore (_) of liggend streepje (-).';
}
if($_POST['wachtwoord'] == "") {
$error[] = 'Er is geen wachtwoord ingevuld.';
}
if(geregistreerd($_POST['gebruikersnaam'],gebruikersnaam)) {
$error[] = '<strong>'.$_POST['gebruikersnaam'].'</strong> is reeds geregistreerd.';
}
if(geregistreerd($_POST['email'],email)) {
$error[] = '<strong>'.$_POST['email'].'</strong> is reeds geregistreerd. Slechts één account per e-mailadres is toegestaan.';
}
$fouten = sizeof($error);
if($fouten != 0) {
echo 'Er kon geen account worden aangemaakt omwille van de volgende reden(en):';
echo '<ul>';
for($i = 0; $i < $fouten; $i++) {
echo '<li>'.$error[$i].'</li>';
}
echo '</ul>';
} else {
$activatiecode = activatiecode($cfg['act_lengte']);
$tpl = new TemplatePower('mail.tpl');
$tpl->prepare();
$tpl->assign(array(
"site" => $cfg['site'],
"url" => $cfg['url'],
"gebruikersnaam" => $_POST['gebruikersnaam'],
"wachtwoord" => $_POST['wachtwoord'],
"code" => $activatiecode
));
$template = $tpl->getOutputContent();
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: ".$cfg['site']." <".$cfg['email'].">\n";
mail($_POST['email'],"Account op ".$cfg['site']." activeren",$template,$headers);
$gebruikersnaam = $_POST['gebruikersnaam'];
$wachtwoord = $_POST['wachtwoord'];
$email = $_POST['email'];
$naam = $_POST['naam'];
$plaatsnaam = $_POST['plaatsnaam'];
$telefoon = $_POST['telefoon'];
mysql_query("INSERT INTO leden_temp (gebruikersnaam,wachtwoord,datum,email,code,naam,plaatsnaam,telefoon) VALUES ('".$gebruikersnaam."','".md5($wachtwoord)."','".time()."','".$email."','".$activatiecode."','".$naam."','".$plaatsnaam."','".$telefoon."')");
?>
<form id="formElem" name="formElem" action="" method="post">
<fieldset class="step">
<legend>Voltooien</legend>
<p>
Je account is tijdelijk geregistreerd. Controleer nu je mailbox, binnen enkele ogenblikken zal er een activatiemail arriveren.<br /><strong>Attentie Hotmail-gebruikers:</strong> Kijk ook bij "Ongewenste post"!!
</p>
<p class="submit">
</p>
</fieldset>
</form>
<?php
}
} else { ?>
?>
<div id="steps">
<form action="" method="post">
<fieldset class="step">
<legend>Account</legend>
<p>
<label for="gebruikersnaam">Gebruikersnaam</label>
<input id="gebruikersnaam" name="gebruikersnaam" />
</p>
<p>
<label for="email">E-mail</label>
<input id="email" name="email" type="email" AUTOCOMPLETE=OFF />
</p>
<p>
<label for="wachtwoord">Wachtwoord</label>
<input id="wachtwoord" name="wachtwoord" type="password" AUTOCOMPLETE=OFF />
</p>
</fieldset>
<fieldset class="step">
<legend>Persoonlijk</legend>
<p>
<label for="naam">Volledige naam</label>
<input id="naam" name="naam" type="text" AUTOCOMPLETE=OFF />
</p>
<p>
<label for="plaatsnaam">Plaatsnaam</label>
<input id="plaatsnaam" name="plaatsnaam" type="text" AUTOCOMPLETE=OFF />
</p>
<p>
<label for="telefoon">Telefoon</label>
<input id="telefoon" name="telefoon" type="tel" AUTOCOMPLETE=OFF />
</p>
</fieldset>
<fieldset class="step">
<legend>Voltooien</legend>
<p>
Als alle stappen volledig zijn ingevuld
kunt u nu uw registratie afronden door
hieronder op 'Voltooien' te klikken.
Werkt dit niet? Dan kunt u terug naar de
stap waar een rood kruisje bij is verschenen.
</p>
<p class="submit">
<button id="registerButton" type="submit">Voltooien</button>
</p>
</fieldset>
</form>
</div>
<div id="navigation" style="display:none;">
<ul>
<li class="selected">
<a href="#">Account</a>
</li>
<li>
<a href="#">Persoonlijk</a>
</li>
<li>
<a href="#">Voltooien</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
Alvast bedankt, hoop dat ik weer wat leer van het antwoord :)
Gewijzigd op 10/01/2011 23:55:10 door Joran den Houting
Begin je pagina met
Code (php)
1
2
3
4
2
3
4
<?php
ini_set('display_errors', 'On'); // error reporting aan
error_reporting(E_ALL);
?>
ini_set('display_errors', 'On'); // error reporting aan
error_reporting(E_ALL);
?>
En controleer ook of je query wel (goed) wordt uitgevoerd.
Zie ook http://www.phphulp.nl/php/tutorial/php-algemeen/hoe-zet-je-iets-correct-op-phphulp/731/voordat-je-iets-op-phphulp-post-/1919/ voor tips.
Controleer daarnaast je query eens door deze te echo-en naar het scherm.
Controleren of een formulier verzonden is doe je door $_SERVER['REQUEST_METHOD'] == "POST" en niet door $_POST['Submit']
$_SERVER['PHP_SELF'] is onveilig.
Gewijzigd op 10/01/2011 22:25:53 door Obelix Idefix
Gedaan, krijg nu errors :)
Staan er spaties voor je script ?
Ik heb hem direct uit dreamweaver gekopieerd... Lijkt me sterk, alleen tabs voor overzichtelijkheid :p
Joran den Houting op 10/01/2011 23:14:43:
Gedaan, krijg nu errors :)
Daar kunnen we wat mee.....
Code (php)
1
2
2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php:26) in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/sessie.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php:26) in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/sessie.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php:26) in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/sessie.php on line 2
en na versturen krijg ik dit:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php:26) in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/sessie.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php:26) in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/sessie.php on line 2
Notice: Use of undefined constant gebruikersnaam - assumed 'gebruikersnaam' in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php on line 47
Notice: Use of undefined constant email - assumed 'email' in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php on line 50
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php:26) in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/sessie.php on line 2
Notice: Use of undefined constant gebruikersnaam - assumed 'gebruikersnaam' in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php on line 47
Notice: Use of undefined constant email - assumed 'email' in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/registreren.php on line 50
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Deprecated: Function eregi() is deprecated in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Line 33 t/m 41 in config.php:
Code (php)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function activatiecode ($lengte) {
$activatie = "";
mt_srand ((double) microtime() * 1000000);
while (strlen($activatie) < $lengte) {
$kiezen = chr(mt_rand (0,255));
>>>>>> if (eregi("^[a-zA-Z0-9]$", $kiezen)) $activatie = $activatie.$kiezen;
}
return ($activatie);
}
$activatie = "";
mt_srand ((double) microtime() * 1000000);
while (strlen($activatie) < $lengte) {
$kiezen = chr(mt_rand (0,255));
>>>>>> if (eregi("^[a-zA-Z0-9]$", $kiezen)) $activatie = $activatie.$kiezen;
}
return ($activatie);
}
regel met >>>>>> ervoor is line 38 van de error.
Gewijzigd op 11/01/2011 00:34:07 door Joran den Houting
Er mag geen output naar de browser zijn voor session_start(). Verder is eregi() antiek en moet je ddi door preg_match() vervangen.
Code (php)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
function activatiecode ($lengte) {
$activatie = "";
mt_srand ((double) microtime() * 1000000);
while (strlen($activatie) < $lengte) {
$kiezen = chr(mt_rand (0,255));
if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $kiezen))
$activatie = $activatie.$kiezen;
}
return ($activatie);
}
$activatie = "";
mt_srand ((double) microtime() * 1000000);
while (strlen($activatie) < $lengte) {
$kiezen = chr(mt_rand (0,255));
if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $kiezen))
$activatie = $activatie.$kiezen;
}
return ($activatie);
}
Krijg ik deze error:
Code (php)
1
Fatal error: Maximum execution time of 50 seconds exceeded in /customers/jorandesign.nl/jorandesign.nl/httpd.www/stugister/config.php on line 38
Gewijzigd op 11/01/2011 00:36:10 door Joran den Houting