Jump to content

PinkHTML

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by PinkHTML

  1. User: pinkhtml

    Website: http://www.pinkhtml.com/

     

    Right now I have only one php file and when I run it, it show 500 error

     

    This is script I'm using

    $db = mysqli_connect("localhost","<USER>","<PASSWORD>","<DB>");
    
    if (mysqli_connect_errno()) {
     printf("Connect failed: %s\n", mysqli_connect_error());
     exit();
    }
    
    $em = $_POST['email'];
    $ps = md5($_POST['pass']);
    
    if ($q = mysqli_query($db, "SELECT * FROM `login` WHERE `email` = '$em' AND `password` = '$ps'")) {
     if ($r = mysqli_fetch_row($q)) {
      printf("%s",$r[2]);
      setcookie("token",$r[5],time()+3600+24,"/",".pinkhtml.com");
     }else{
      printf("0");
      exit;
     }
    }
    

     

    You can test it here http://pinkhtml.com/developer/login.html

×
×
  • Create New...