WIE FIXED KRIJGT 0,15
VOOR 7 UUR FIXEN KRIJG JE 0,3 PUNTEN!
Het werkt nu goed maar alleen nog niet op hotmail accounts merk ik? hoe kan dat?
Weet iemand hoe ik ervoor kan zorgen dat hij deze fout niet meer aangeeft :
Parse error: syntax error, unexpected T_ELSE in /home/joeriwii/domains/joeriwii.one2xs.nl/public_html/registratie.php on line 162
in deze code?
WIE FIXED KRIJGT 0,15
VOOR 7 UUR FIXEN KRIJG JE 0,3 PUNTEN!
VOOR 7 UUR FIXEN KRIJG JE 0,3 PUNTEN!
Het werkt nu goed maar alleen nog niet op hotmail accounts merk ik? hoe kan dat?

Weet iemand hoe ik ervoor kan zorgen dat hij deze fout niet meer aangeeft :
Parse error: syntax error, unexpected T_ELSE in /home/joeriwii/domains/joeriwii.one2xs.nl/public_html/registratie.php on line 162
in deze code?
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]parser.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Database details[/COLOR]
[COLOR= #0000BB]$name_db[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"joeriwii_cpiscool"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Name of database[/COLOR]
[COLOR= #0000BB]$user_db[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"joeriwii_cpcool"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Username for database[/COLOR]
[COLOR= #0000BB]$pass_db[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"******"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Password for database[/COLOR]
[COLOR= #0000BB]$host_db[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Host for database[/COLOR]
[COLOR= #0000BB]$connect_db[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$host_db[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$user_db[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$pass_db[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Making connection to our database [/COLOR]
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$name_db[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$connect_db[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$achtergrond[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]kleur[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$achtergrond[/COLOR][COLOR= #007700]))
{[/COLOR]
[URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"achtergrond"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$achtergrond[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$form[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Achtergrond verandert naar: "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$achtergrond[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$meta[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"<meta http-equiv="refresh" content="3;url=achtergrond2.php" />"[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$form[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Geen geldigen achtergrond."[/COLOR][COLOR= #007700];
}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$form[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"<form method=POST action=achtergrond2.php>
<p>
<input type=radio value=#333333 checked name=kleur>Grijs<br>
<input type=radio name=kleur value=#666666>Grijzer<br>
<input type=radio name=kleur value=#999999>Grijst :P<br>
<input type=submit value=Submit name=submit>
</form>
"[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="opmaak.css" />
<title>CPiscool | Voor alles over cp</title>
<script type="text/javascript">
function insertBBCode(elementID, bbCode)
{
if (typeof elementID === undefined || typeof bbCode === undefined) return;
if (document.getElementById(elementID)) {
var elementObject = document.getElementById(elementID);
if (document.selection) { // IE
elementObject.focus();
var sel = document.selection.createRange();
sel.text = bbCode;
} else if (elementObject.selectionStart || elementObject.selectionStart == 0) {
var startPos = elementObject.selectionStart;
var endPos = elementObject.selectionEnd;
elementObject.value = elementObject.value.substring(0, startPos) + bbCode + elementObject.value.substring(endPos, elementObject.value.length);
} else {
elementObject.value += bbCode;
}
elementObject.focus();
}
}
</script>
</head>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$meta[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<body bgcolor="[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$HTTP_COOKIE_VARS[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achtergrond"[/COLOR][COLOR= #007700]])) {[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"#363636"[/COLOR][COLOR= #007700]; }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$HTTP_COOKIE_VARS[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achtergrond[/COLOR][COLOR= #007700]];}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]">"[/COLOR][COLOR= #007700];[/COLOR]
?>
<div id="header"></div>
<div id="menu"> <h1> <a title="home" href="index.php" target="_self" class="menu">Home</a> |
<a title="Nieuws" href="nieuws.php" target="_self" class="menu">Nieuws</a> |
<a title="CP-paginas" href="paginas.php" target="_self" class="menu">CP-paginas</a> |
<a title="Adverteren" href="Adverteren.php" target="_self" class="menu">Adverteren</a>|
<a title="Inloggen" href="inloggen.php" target="_self" class="menu">Inloggen</a> |
<a title="Berichtenbalk" href="plaats.php" target="_self" class="menu">Berichtenbalk</a> |
<a title="Contact" href="contact.php" target="_self" class="menu">Contact</a> |
<a title="Settings" href="achtergrond2.php" target="_self" class="menu">Instellingen</a> |
</h1> </div>
<div id="content">
<div id="leftcontent">
<div id="leftcontentheader"></div>
<div id="leftcontentachtergrond"><h2>Welkom</h2>
<h3>
// Hier komt alle behandeling van het formulier
// Mocht er een fout optreden, is het leuk dat de gebruiker niet alles opnieuw hoeft
// in te vullen. Daarom vullen we de array $post met de velden,
// uiteraard door htmlentities() gehaald (veiligheidsmaatregel).
// Wachtwoord moeten wel opnieuw ingevuld worden, nogmaals veiligheidsmaatsregel
$post = array(
gebruikersnaam => htmlentities($_POST[gebruikersnaam]),
email => htmlentities($_POST[email]));
// Verwerking
// Eerst enkele functies schrijven die de controle vergemakkelijken
function geregistreerd($zoek, $veld) {
// Ik plaats de query op meerdere lijnen voor de leesbaarheid
$qZoek = mysql_query("
SELECT COUNT(".$veld.")
FROM gebruikers
WHERE ".$veld." = ".mysql_real_escape_string($zoek)."");
// Als de gebruikersnaam nog niet bestaat, geeft dit false, anders true
return (mysql_result($qZoek,0) == 0 ? false : true);
}
// De reguliere expressies voor de controle op e-mailadressen is door FangorN samengesteld :]
function is_email($in) {
list($local, $host) = explode(@, $in);
$pattern_local = ^([0-9a-z]*([-|_]?[0-9a-z]+)*)(([-|_]?).
. ([-|_]?)[0-9a-z]*([-|_]?[0-9a-z]+)+)*([-|_]?)$;
$pattern_host = ^([0-9a-z]+([-]?[0-9a-z]+)*)(([-]?).([-]?)
. [0-9a-z]*([-]?[0-9a-z]+)+)*.[a-z]{2,4}$;
$match_local = eregi($pattern_local, $local);
$match_host = eregi($pattern_host, $host);
return ($match_local && $match_host ? true : false);
}
// Hier zullen we de fouten in opslaan
$fouten = array();
if(empty($_POST[gebruikersnaam])) {
$fouten[] = Er is geen gebruikersnaam opgegeven.;
} elseif(strlen($_POST[gebruikersnaam]) > 50) {
$fouten[] = De gebruikersnaam mag niet langer dan 50 tekens zijn.;
} elseif(geregistreerd($_POST[gebruikersnaam], gebruikersnaam)) {
$fouten[] = De gebruikersnaam is reeds geregistreerd.;
}
if(empty($_POST[wachtwoord])) {
$fouten[] = Er is geen wachtwoord opgegeven.;
} elseif($_POST[wachtwoord] != $_POST[wachtwoord_herh]) {
$fouten[] = De wachtwoorden komen niet overeen.;
}
if(!is_email($_POST[email])) {
$fouten[] = Er is geen geldig e-mailadres opgegeven.;
} elseif(geregistreerd($_POST[email], email)) {
$fouten[] = Dit e-mailadres is reeds geregistreerd.;
}
// Het formulier is gecontroleerd, nu kijken we of er fouten opgetreden zijn
if(count($fouten) > 0) {
?>
<span style="color: #FF0000; ">De volgende fouten zijn opgetreden:</span>
<ul>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]) {[/COLOR] ?>
<li><?=$fout?></li>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] ?>
</ul>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// Er zijn geen fouten, voer registratie uit! [/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO gebruikers
(gebruikersnaam, wachtwoord, email, datum)
VALUES
("[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",
"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",
"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",
NOW()
)"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$gebruikers_id[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_insert_id"]mysql_insert_id[/URL][COLOR= #007700]();[/COLOR]
[COLOR= #FF8000]// Een volledig willekeurige code van 40 tekens [/COLOR]
[COLOR= #0000BB]$activatiecode[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/microtime"]microtime[/URL][COLOR= #007700]()*[/COLOR][URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700])));[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO gebruikers_activaties
(gebruikers_id, sleutel)
VALUES
("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$gebruikers_id[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$activatiecode[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Voor de regeleinden [/COLOR]
[URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]EOL[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"
"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Je kan deze mail uit uitbreiden, evt HTML mail,... [/COLOR]
[COLOR= #0000BB]$mail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Bedankt voor je registratie, blaat, blaat, activeer hier:[/COLOR][COLOR= #007700].[/COLOR]EOL[COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$mail[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]http://www.joeriwii.one2xs.nl/activatie.php?gebruiker=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$gebruikers_id[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]&sleutel=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$activatiecode[/COLOR][COLOR= #007700].[/COLOR]EOL[COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$mail[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]Bye bye.[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$header[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"CPiscool" <meldaan@joeriwii.one2xs.nl>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]Je account activeren[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$mail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$header[/COLOR][COLOR= #007700]);[/COLOR]
?>
Er is een e-mail gestuurd met activatiedetails.
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Formulier verbergen [/COLOR]
[COLOR= #0000BB]$verberg_form[/COLOR] [COLOR= #007700]=[/COLOR] false[COLOR= #007700];
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// Dit stuk wordt uitgevoerd als het formulier nog niet is verzonden.
// Het formulier is nog niet verzonden, dus is er ook geen $post array.
// we maken deze dus zelf aan met initiele waardes, om warnings te voorkomen. [/COLOR]
[COLOR= #0000BB]$post[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]
[COLOR= #DD0000]gebruikersnaam[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]email[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$verberg_form[/COLOR][COLOR= #007700])) {[/COLOR]
?>
<form action="<?=htmlentities($_SERVER[REQUEST_URI])?>" method="post">
Gewenste gebruikersnaam:<br />
<input type="text" name="gebruikersnaam" value="<?=$post[gebruikersnaam]?>" /><br />
Wachtwoord:<br />
<input type="password" name="wachtwoord" /><br />
Wachtwoord herhalen:<br />
<input type="password" name="wachtwoord_herh" /><br />
E-mailadres:<br />
<input type="text" name="email" value="<?=$post[email]?>" /><br />
<br />
<input type="submit" value="Registreer" />
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
<br>
</h3></div>
<div id="leftcontentfooter"></div></div>
<div id="rightcontent"><h2>Log In </h2> <h3> Binnenkort kan je hier inloggen </h3></div></div>
<div id="berichtenbg">
<div id="berichten"><h6><marquee>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]weergeef.php[/COLOR][COLOR= #007700]);[/COLOR] ?></marquee></h6></div></div>
<div id="footer"><h6> Clubpenguinissupercool - alle rechten voorbehouden, niet kopieren, voor vragen mailen naar CPISC@Live.be</h6></div>
</body>
</html> WIE FIXED KRIJGT 0,15
VOOR 7 UUR FIXEN KRIJG JE 0,3 PUNTEN!

: