Jump to content

Login PHP


Lucian

Recommended Posts

I'm having some problems with this PHP code.  It gives me an error saying:

Parse error: syntax error, unexpected $end in /home/zendurl/public_html/lucian/php/login.php on line 27

Can someone please tell me how to fix this problem.  Below is the PHP that i have.

<?php
$data = file("log.txt");
 
  for($x = 0; $x < count($data); $x++)
  {
      $parts = explode('|',$data[$x]);
      $name_check = strpos($parts[0],$_POST['username']);
      if($name_check == true)
      {
          $name = 1;
      }else{
          $name = 0;
      }
      $pass_check = strpos($parts[1],$_POST['password']);
      if($pass_check == true)
      {
          $pass = 1;
      }else{
          $pass = 0;
      }
      if($name == 1 && $pass == 1)
      {
          echo "hello";
         
      }
?>
Link to comment
https://forums.phpfreaks.com/topic/33301-login-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.