Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.74 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Cataclysmically Gorgeous</title>
  4.  
  5. <link href="style.css" rel="stylesheet"/>
  6.  
  7. </head>
  8. <body>
  9.        
  10.            
  11.  
  12.     <div id="header">
  13.        
  14.        
  15.    
  16.     </div>
  17.  
  18.     <div id="menubar">
  19.             <ul id='menu'>
  20.                 <li class="button"><a href='index.php' >Home</a></li></span>
  21.                 <li class="button"><a href='forum.php'  >Forum</a></li>
  22.                 <li class="button"><a href='registerform.php'  >Register</a></li>
  23.                 <li class="button"><a href='contact.php'  >Contact</a></li>
  24.                 <li class="button"><a href='news.php'  >News</a></li>
  25.                 <li class="button"><a href='links.php'  >Links</a></li>
  26.                 <li class="button"><a href='information.php'  >Information</a></li>
  27.             </ul>
  28.     </div>
  29.  
  30.     <div id="leftcontainer">
  31.    
  32.       <div class="account">
  33.  
  34.  
  35.  
  36.  
  37. <?php
  38. session_start();
  39. if($_GET["regname"] && $_GET["regemail"] && $_GET["regpass1"] && $_GET["regpass2"] )
  40. {
  41.     if($_GET["regpass1"]==$_GET["regpass2"])
  42.     {
  43.     $servername="localhost";
  44.     $username="****";
  45.     $password="****";
  46.     $conn=  mysql_connect($servername,$username,$password)or die(mysql_error());
  47.     mysql_select_db("trc_se",$conn);
  48.     $sql="insert into test (name,email,password)values('$_GET[regname]','$_GET[regemail]','$_GET[regpass1]')";
  49.     $result=mysql_query($sql,$conn) or die(mysql_error());  
  50.     print "<h1>Grattis! Du är nu medlem</h1>";
  51.    
  52.     print "<a href='index.php'>Gå till Logga-in sidan</a>";
  53.     }
  54.     else print "Lösenorden matchar ej";
  55. }
  56. else print"Invalid Data";
  57.  
  58.     $servername = mysql_real_escape_string"localhost";
  59.     $username   = mysql_real_escape_string($_POST["userlogin"]);
  60.     $password   = mysql_real_escape_string($_POST["password"]);
  61.  
  62.     $query = "SELECT username FROM usertable WHERE username = '$username' AND password = '$password'";
  63. ?>
  64.  
  65. </body>
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement