Guest User

Untitled

a guest
Apr 27th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <?php
  2. error_reporting(E_PARSE);
  3.  
  4.  $username = $_GET['username'];
  5.  $password = $_GET['password'];
  6.  
  7.  if($username && $password)
  8.  {      
  9.    // Crea Connessione
  10.          $conn= new mysqli_connect("localhost","admin","admin");
  11.            
  12.            // Check connection
  13.            if (!$conn){
  14.              die("Errore selezione db".mysqli_connect_error());
  15.            }echo "Connessione avvenuta con successo";
  16.            
  17.    
  18.      
  19.    $db_select= mysqli_select_db('lifesport',$conn);
  20.    if (!$db_selected) {
  21.     die ("Errore nella selezione del database: " . mysql_error());
  22. }
  23.  
  24.      
  25. }
  26.  
  27.      // Selezione Database
  28.  
  29.   else
  30.      {
  31.          die ("Inserisci username e password");
  32.      }
  33. ?>
Add Comment
Please, Sign In to add comment