Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
- <meta name="robots" content="INDEX,FOLLOW">
- <meta name="keywords"
- content="">
- <meta name="description"
- <title></title>
- <link rel="stylesheet" href="format.css" type="text/css">
- </head>
- <body >
- <table width="86%" align="center" cellspacing="0" cellpadding="0" border="0" >
- <tr>
- <td class="li"> </td><td >
- <!--ende aussentab-->
- <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0" >
- <tr>
- <td><table align="right" style="border-left:solid 1px #343434;" id="menu2" border="0" cellpadding="0" cellspacing="0" >
- <tr>
- <td ><a href="Login.html" onfocus="this.blur()">Memberbereich</a></td>
- <td ><a href="login.html" onfocus="this.blur()">Private Fotos</a></td>
- <td ><a href="Login.html" onfocus="this.blur()">Gästebuch</a></td>
- <td ><a href="Impressum.html" onfocus="this.blur()">Impressum</a></td>
- </tr>
- </table>
- <!-- ende menü oben--> </td>
- </tr>
- <tr>
- <td id="top" > </td>
- </tr>
- <tr>
- <td width="100%" id="leiste1" ><!--menü oben-->
-
- <!-- ende menü oben--></td>
- </tr>
- </table>
- <!--ende oben-->
- <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0" >
- <tr>
- <td id="sp1" valign="top" >
- <!-- menü links-->
- <table align="center" id="menu1" border="0" cellpadding="0" cellspacing="0" >
- <tr>
- <td >
- <a href="index.php" onfocus="this.blur()"> Home</a></td>
- </tr>
- <tr>
- <td >
- <a href="kontakt.php" onfocus="this.blur()"> Kontakt</a></td>
- </tr>
- <tr>
- <td >
- <a href="login.php" onfocus="this.blur()"> Members-Bereich</a></td>
- </tr><tr>
- <td >
- <a href="gallerie.php" onfocus="this.blur()"> Foto-Gallerie</a></td>
- </tr>
- <tr>
- <td >
- <a href="login.php" onfocus="this.blur()"> Login</a></td>
- </tr>
- <tr>
- <td >
- <a href="register.php" onfocus="this.blur()"> Registriere dich jetzt!</a></td>
- </tr>
- <tr>
- <td >
- <a href="partner.php" onfocus="this.blur()"> Weitere Links</a></td>
- </tr >
- <tr>
- <td >
- <!-- ende menü links-->
- </table>
- <div style="margin-top:1px;background-image:url(images/ob.jpg);background-repeat:repeat-x;"> </div>
- </td>
- <td valign="top" id="sp2">
- <h2>Anmeldung</h2>
- <?php
- // Connects to your Database
- $db_server ="localhost";
- $db_user ="";
- $db_pass ="";
- $db ="";
- mysql_connect($db_server,$db_user,$db_pass) or die(mysql_error());
- mysql_select_db($db) or die(mysql_error());
- //This code runs if the form has been submitted
- if (isset($_POST['submit'])) {
- //This makes sure they did not leave any fields blank
- if (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) {
- die('You did not complete all of the required fields');
- }
- // checks if the username is in use
- if (!get_magic_quotes_gpc()) {
- $_POST['username'] = addslashes($_POST['username']);
- }
- $usercheck = $_POST['username'];
- $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'")
- or die(mysql_error());
- $check2 = mysql_num_rows($check);
- //if the name exists it gives an error
- if ($check2 != 0) {
- die('Sorry, the username '.$_POST['username'].' is already in use.');
- }
- // this makes sure both passwords entered match
- if ($_POST['pass'] != $_POST['pass2']) {
- die('Your passwords did not match. ');
- }
- // here we encrypt the password and add slashes if needed
- $_POST['pass'] = md5($_POST['pass']);
- if (!get_magic_quotes_gpc()) {
- $_POST['pass'] = addslashes($_POST['pass']);
- $_POST['username'] = addslashes($_POST['username']);
- }
- // now we insert it into the database
- $passwort = $_POST['pass'];
- $name = $_POST['username'];
- $insert = "INSERT INTO users (`username, `password`) VALUES ('$name', '$passwort')";
- $add_member = mysql_query($insert);
- mkdir("./html/phoBNC/users/".$name, 0777);
- ?>
- <h1>Registered</h1>
- <p>Thank you, you have registered - you may now <a href=login.php>login</a>.</p>
- <?php
- }
- else
- {
- ?>
- <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
- <table border="0">
- <tr><td>Username:</td><td>
- <input type="text" name="username" maxlength="60">
- </td></tr>
- <tr><td>Password:</td><td>
- <input type="password" name="pass" maxlength="10">
- </td></tr>
- <tr><td>Confirm Password:</td><td>
- <input type="password" name="pass2" maxlength="10">
- </td></tr>
- <tr><th colspan=2><input type="submit" name="submit"
- value="Register"></th></tr> </table>
- </form>
- <?php
- }
- ?>
- <br>
- <br>
- <br>
- <br>
- <h2></h2>
- <br>
- <br>
- <br>
- <br>
- <h2></h2>
- <br>
- <br>
- <br>
- <br>
- </td>
- <!-- ende inhalt-->
- </tr>
- <tr>
- <td colspan="2" id="fussb" >
- <span style="background-color:#2F2F2F;padding:4px;border:solid 1px #343434;color:black"> || </span></td>
- </tr>
- </table>
- <td class="re"> </td><!-- aussentab-->
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement