Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2. session_start();
  3. header("Content-Type: text/html; Charset=uft-8");
  4.  
  5. $host = 'localhost';
  6. $user = 'root';
  7. $password = '';
  8. $db = 'login';
  9.  
  10. $connection = mysqli_connect($host, $user, $password);
  11. if($connection){
  12. if(!mysqli_select_db($connection, $db))
  13. echo "<br>".mysqli_error($connection);
  14. }else{
  15. echo "<br>".mysqli_error();
  16. }
  17.  
  18. echo "
  19. <a href='index2.php?form=register'>Registrieren</a>
  20. <a href='index2.php?form=login'>Einloggen</a>
  21. ";
  22.  
  23. if(empty($_GET['form']) OR !empty($_GET['form']) AND $_GET['form'] == "register"){
  24. // Registrierungsformular
  25. include("register.php");
  26. }else if(!empty($_GET['form']) AND $_GET['form'] == 'login'){
  27. // Loginformular
  28. include("login.php");
  29. }
  30.  
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement