title: creating simple login function using PHP and SQLite
body: <p>I am trying to create simple log-in function where I am using PHP and SQLite to make it work but every time I click log-in I get <b>"Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in G:\wwwroot\login.php:3 Stack trace: #0 G:\wwwroot\login.php(3): PDO->__construct('sqlite:G:/wwwro...') #1 {main} thrown in G:\wwwroot\login.php on line 3"</b> am I doing something wrong any advice will be GREAT :).</p>
  
  <p>I have log-in code and saved it as index.php</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;form action="login.php" method="POST"&gt;
          &lt;p&gt;Username&lt;/p&gt;&lt;input type ="text" name="user"/&gt;
          &lt;p&gt;password&lt;/p&gt;&lt;input type="password" name="pass"/&gt;
          &lt;br /&gt;
          &lt;input type="submit" value="login"/&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have another php called login.php and will be activated when the user clicks login button</p>
  
  <pre><code>&lt;?php
      $dir = 'sqlite:G:/wwwroot/SQLite/user_information.db';
      $dbh = new PDO($dir) or die ("cannot open");
  
      $myusername = $_POST['user'];
      $mypassword = $_POST['pass'];
  
      $myusername = stripslashes($myusername);
      $mypassword = stripslashes ($mypassword);
  
      $query = "SELECT * FROM user_information WHERE username='$myusername' AND password='$mypassword'";
      $result = mysql_query($query);
      $count = mysql_num_rows($result);
  
      if($count==1){
      echo'worked';
      }
  
  ?&gt;
  </code></pre>
  
  <p>And at last I have user_information.db where I downloaded sqlite3 and using cmd program to create the database.</p>
  
  <pre><code>G:\wwwroot\SQLite&gt;sqlite3 user_information.db
  SQLite version 3.8.4.3 2014-04-03 16:53:12
  Enter ".help" for usage hints.
  sqlite&gt; create table user_info(username varchar(20), password varchar(20));
  sqlite&gt; insert into user_info values('WESTKINz','password');
  sqlite&gt; insert into user_info values('LAME','123456');
  </code></pre>