title: Trying to change it so that the system gets the date. Not to get the date from the user
body: <p>I have an issue I am trying to get the current date when user updates the form. What I am trying to do is instead of posting what the user types in for the date. I wanted the system to get the date. How do I make it so that the update_process.php page gets the current date. In the $_POST[date] bindparam section. I tried adding getdate() in there but that does not work. I am confused on how to do it.</p>
  
  <pre><code>&lt;?php
      $serverName = "localhost";
  
      try {
          $db= new PDO( "sqlsrv:server=$serverName ; Database=systems_requests", "test", "test");
          $db-&gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
      } catch(Exception $e) {
          die( print_r( $e-&gt;getMessage() ) );
      }
  
      $sql = 'UPDATE requests SET id=:id, studentId= :studentId, name= :name, date= :date WHERE id= :id';
      $stmt = $db-&gt;prepare($sql);
      $stmt-&gt;bindParam(':id', $_POST['id'], PDO::PARAM_INT);
      $stmt-&gt;bindParam(':studentId', $_POST['studentId'], PDO::PARAM_STR);
      $stmt-&gt;bindParam(':name', $_POST['name'], PDO::PARAM_STR);
      $stmt-&gt;bindParam(':date', $_POST['date'], PDO::PARAM_STR);
  
      try {
          $stmt-&gt;execute();
      } catch(PDOException $exception) {
          echo "Error: " . $exception-&gt;getMessage();
      }
  ?&gt;
  </code></pre>
  
  <p>also how would I change the count to reflect that to count how many Bob's signed up with todays date.</p>
  
  <pre><code>&lt;?php
      $stmt = $db-&gt;prepare("SELECT COUNT(*) AS rows_cnt FROM students WHERE  name='Bob' AND date=getdate()");
      $stmt-&gt;execute();
      while ($row = $stmt-&gt;fetch(PDO::FETCH_ASSOC)) {
          echo $row['rows_cnt'];
      }
  ?&gt;
  </code></pre>