Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index page
- -------------------------
- <html>
- <head>
- <title>MPGH Story</title>
- <!--- By KushxOrangeJuice ---!>
- <style>
- *{ FONT-SIZE: 8pt; FONT-FAMILY: verdana; } b { FONT-WEIGHT: bold; } .listtitle { BACKGROUND: #425984; COLOR: #EEEEEE; white-space: nowrap; } td.list { BACKGROUND: #EEEEEE; white-space: nowrap; } </style>
- </head>
- <center><br><br><br><br>
- <h1>MPGH Story</h1>
- <table cellspacing=1 cellpadding=5>
- <tr>
- <td class=listtitle colspan=2>AmoraMS</td></tr>
- <form action="register_do.php" method="POST">
- <tr><td class=list align=right>Username:</td><td class=list><input type=text name=name maxlength="30"></td></tr>
- <tr><td class=list align=right>Password:</td><td class=list><input type=password name=pass maxlength="30"></td></tr>
- <tr><td class=listtitle align=right colspan=2><input type=submit name=submit value='Register'></td><?php include("total.php");?><?php include("status.php");?></tr>
- </form>
- </table>
- </center></body></html>
- -------------------------
- Registry Action Page
- ---------------------
- <?php
- print '<title>MPGH Story</title>';
- $name = $_POST['name'];
- $pass = $_POST['pass'];
- $host['naam'] = 'localhost'; // my host
- $host['gebruikersnaam'] = 'root'; // my database username
- $host['wachtwoord'] = 'skyjack'; // my database password
- $host['databasenaam'] = 'odinms'; // my database name
- $db = mysql_connect($host['naam'], $host['gebruikersnaam'], $host['wachtwoord']) OR die ('Cant connect to the database');
- mysql_select_db($host['databasenaam'], $db);
- $sel = 'SELECT * FROM users WHERE username="'.$_POST['name'].'"';
- if($name == ""){
- echo 'No username filled in';
- exit();
- }elseif(mysql_num_rows(mysql_query($sel)) >= 1 ){
- echo 'This username does already exists!';
- exit();
- }elseif($pass == ""){
- echo 'No password filled in';
- exit();
- }else{
- $d = 'INSERT INTO users (username, password, pin, gender, GM) VALUES ("'.$name.'", "'.$pass.'", "0", "0","0")';
- mysql_query($d) OR die (mysql_error());
- echo 'Your account has been created, you can now login.';
- }
- ?>
- ---------------------
- Server status it shows up on the bottom of the page this script is fine though runs perfect.
- ---------------------
- Idk what page this is for but this is where i get all the errors
- ------------------
- <?php
- $host['naam'] = 'localhost'; // my host
- $host['gebruikersnaam'] = 'root'; // my database username
- $host['wachtwoord'] = 'skyjack'; // my database password
- $host['databasenaam'] = 'odinms'; // my database name
- $db = mysql_connect($host['naam'], $host['gebruikersnaam'], $host['wachtwoord']) OR die ('Cant connect to the database');
- mysql_select_db($host['databasenaam'], $db);
- $result = mysql_query("SELECT * FROM users", $db);// Account section
- $num_rows = mysql_num_rows($result);
- echo "$num_rows Accounts\n";
- $result = mysql_query("SELECT * FROM characters", $db);// Character section
- $num_rowsc = mysql_num_rows($result);
- echo " $num_rowsc Characters\n";
- ?>
- ------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement