Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases
You last visited: Today at 23:55

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PHP Register Script !

Discussion on PHP Register Script ! within the Coding Releases forum part of the Coders Den category.

Reply
 
Old   #1
 
Strean's Avatar
 
elite*gold: 141
Join Date: Dec 2009
Posts: 554
Received Thanks: 3,918
PHP Register Script !

Ich dachte mir ich release einfach mal mein Registrierungs Script geschrieben in PHP/HTML/JQUERY

-Vorraussetzungen um das script zu usen ( AHNUNG VON P

PHP Code:
<?php

  $host 
"";
  
$user "";
  
$pw "";
  
$db "";
  
$kommentar "*Bitte alle Felder korrekt ausfüllen !";
  
  
$connect mysql_connect($host,$user,$pw)
    or die (
mysql_error());
    
  
mysql_select_db($db,$connect)
    or die (
mysql_error());

?>

<center>
          <h3>###Überschrift###</h3><p />
          <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
            Username:<br /><input name="username" type="text" size="30" maxlength="15" /><br />
            Password:<br /><input name="password" type="password" size="30" maxlength="15" /><br />
            Password Wiederholen:<br /><input name="password-re" type="password" size="30" maxlength="15" /><br />
            E-Mail:<br /><input name="email" type="text" size="30" /><p />
            <div id="submit"><input type="submit" name="gesendet" value=""/></div>
          </form>
            <?php
             
if(!empty($_POST))
              { 
               unset(
$kommentar);            
               if(empty(
$_POST['username']))
               {
                 
$kommentar .= "*Bitte gebe einen Username ein.";
               }               
               if(
$_POST['password'] != $_POST['password-re'] || empty($_POST['password']))
               {
                 
$kommentar .= "<br />*Bitte gebe 2 Mal das selbe Password ein.";
               }
               if(!
strstr($_POST['email'],"@"))
               {
                 
$kommentar .= "<br />*Bitte gebe eine gültige E-Mail Adresse ein.";
               }    
               else
               {
                 
$username $_POST['username'];
                 
$pw md5($_POST['password']);
                 
$mail $_POST['email'];
                 
mysql_query("INSERT INTO account(username,password,perms,email) // hier eure tabellen namen anpassen VALUES('$username','$pw','1','$mail')"$connect);
                 
$kommentar "*Du hast alle Felder richtig ausgefüllt. Dein Account wurde erstellt !";    
            
?>
                <head>
                  <meta http-equiv="refresh" content="3; URL=http://euereseite/login.php "> // das login.php hab ich in der section e*pvp coder released
                </head>
            <?php
               
}              
              }
             echo 
"<p />".$kommentar."<br />"
            
            
?>
            
            <div id="click" style="cursor:pointer; color:BlanchedAlmond; border-top:1px solid grey; padding-top:10px;">
            || Deine IP ( Internet Protocoll ) ||
            </div>
            <div id="event"><?php echo "<p /><p style='border: 3px solid grey; width:245px; color:SeaGreen; margin-top:0; height:30px; padding-top:10px;'><b>Deine IP Lautet =></b> ".$_SERVER['REMOTE_ADDR']."<br /></p>";?> </div>
            <script>
              $('#event').hide();
              $('#click').click(function () {
              if ($("#event").is(":hidden")) {
              $("#event").slideDown("slow");
              } else {
              $("#event").hide();
              }
              });    
            </script>
        </center>
Strean is offline  
Thanks
5 Users
Old 02/11/2011, 17:24   #2

 
elite*gold: 1369
Join Date: Jan 2009
Posts: 2,841
Received Thanks: 1,244
Sieht gut aus, könnt' ich gebrauchen.
Yevii is offline  
Old 02/11/2011, 22:55   #3


 
.Marcel''s Avatar
 
elite*gold: 100
Join Date: Sep 2009
Posts: 8,136
Received Thanks: 2,760
Ist ganz ok.
Meiner meinung etwas unsauber geschrieben, aber das ist geschmacks sache.
Ob man die variable $kommentar wirklich braucht ist auch geschmacks sache.
Ich würde sie als unnötig einstufen.
Aber sonst ok
.Marcel' is offline  
Thanks
1 User
Old 02/15/2011, 20:41   #4
 
elite*gold: 0
Join Date: Dec 2009
Posts: 705
Received Thanks: 312
Nice. Funktioniert sehr gut.
v0lle is offline  
Old 02/15/2011, 20:44   #5
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,407
Received Thanks: 2,024
ganz praktisch für die, die´s nicht selbst können / keine Lust haben eins zu schreiben
NotEnoughForYou is offline  
Old 02/24/2011, 17:42   #6
 
elite*gold: 6
Join Date: Mar 2010
Posts: 416
Received Thanks: 221
will den thread hier nicht hochpushen aber da er eh noch auf der ersten seite ist:
<?php echo $_SERVER['PHP_SELF']; ?> das ist unsicher !!!!!!!!
diese variable kann vom client verändert werden
finaldown97 is offline  
Reply


Similar Threads Similar Threads
Register Script [HELP]
09/13/2010 - Flyff Private Server - 5 Replies
Register.php PHP-Code: <?php require('./configs/reg_conf.php'); function doesUsernameExist($name){ $exit = FALSE; $result = @mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account='$name'"); if (mssql_num_rows($result) != 0){ $exit = TRUE; }
Register Script
08/30/2010 - Flyff Private Server - 10 Replies
Liebe Elitepvpers, Versuche schon seit einiger Zeit ein Register Script auf die Flyff Pserver HP einzubinden(Offi V14), aber immer wenn ich auf "Account erstellen" klicke, kommt dieser Fehler: Hier die register.php(angegebene Zeile markiert): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trans itional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;...
Register Script
06/15/2010 - Flyff Private Server - 1 Replies
What's the best caali register script ??? :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown:
Register Script
04/27/2010 - EO PServer Hosting - 19 Replies
Here is a register script. Just extract this to your www folder. Only edit the config.php. All the instructions are inside of config.php. And for register page to work you have to run apache. If CAPTCHA dont work got to your apache folder and replace the php.ini with this one. Then go to task manager and end all apache processes. Then re-run apache, and you will get about 6 errors, just press ok on them. Its supposed to happen. Oh and if your a new and dont know how to get to...
[HELP]Register Script
12/30/2009 - EO PServer Hosting - 17 Replies
Hello Community ... I have an problem with register script I don't know where is www folder lol I must download something ?? Please anyone can help me ! Thanks



All times are GMT +2. The time now is 23:55.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.