- Joined
- May 5, 2012
- Messages
- 110
- Reaction score
- 10
Hi Ragezone,
Welcome to the development of my CMS called : FunCMS
It's going to be completely coded in PHP.
It's going to have my own design.
I already made the index and register.
The login and register system does already work.
Here are some screens:
Here are some snippets:
I hope you guys like my development. If you have any idea's or way's to improve my code, please contact me:
[email protected] (Skype & E-mail).
Welcome to the development of my CMS called : FunCMS
It's going to be completely coded in PHP.
It's going to have my own design.
I already made the index and register.
The login and register system does already work.
Here are some screens:
Here are some snippets:
PHP:
?php
session_start();
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$gebruikersnaam = mysql_real_escape_string($_POST['gebruikersnaam']);
$wachtwoord = sha1(mysql_real_escape_string($_POST['wachtwoord']));
$sql="SELECT * FROM users WHERE username='$gebruikersnaam' and password='$wachtwoord'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
header("location: ingelogd.php");
$_SESSION['ingelogd'] = 1;
$_SESSION['gebruikersnaam'] = $gebruikersnaam;
}else{
echo "Je naam of wachtwoord klopt niet!";
}
}
PHP:
<?php
if(isset($_POST['gebruikersnaam'])) {
if(isset($_POST['wachtwoord'])) {
if(isset($_POST['wachtwoord-opnieuw'])) {
if(strlen($_POST['gebruikersnaam']) > 1) {
if(strlen($_POST['wachtwoord']) > 5) {
if($_POST['wachtwoord'] == $_POST['wachtwoord-opnieuw']){
if($count == 0) {
$query = mysql_query("INSERT INTO users(username, password) VALUES ('$gebruikersnaam', '$wachtwoord')");
$_SESSION['ingelogd'] = 1;
$_SESSION['gebruikersnaam'] = $gebruikersnaam;
header('Location: ingelogd.php');
}else{
echo "Je naam is al in gebruik <br>";
}}else{
echo "Je wachtwoorden zijn niet hetzelfde <br>";
}}else{
echo "Je wachtwoord moet minstens 6 tekens bevatten <br>";
}}else{
echo "Je gebruikersnaam moet minstens 2 tekens bevatten <br>";
}}else{
echo "Je hebt je wachtwoord niet 2 keer ingevuld <br>";
}}else{
echo "Je hebt geen wachtwoord ingevuld<br>";
}}else{
echo "Je hebt geen gebruikersnaam ingevuld<br>";
}} ?>
I hope you guys like my development. If you have any idea's or way's to improve my code, please contact me:
[email protected] (Skype & E-mail).

