title: Can't display data from my DATABASE Server
body: <pre><code>&lt;?php
  //connection to the database 
  try {     
    $pdo = new PDO('mysql:host=localhost;dbname=frostedc_movies;charset=utf8',
                      frostedc_user, 'pass'); 
   echo "connected"; 
  }  
  catch(PDOException $e) {  
   echo $e; //2 
  } 
  
  // select everything from the news table
  $query = "SELECT * FROM movie";// Table name NOT database name 
  
  foreach ($pdo-&gt;query($query) as $row) {
      echo "&lt;table border='1'&gt;";
      echo "&lt;tr&gt;";
          echo "&lt;td width='150'&gt;".$row['movietitle']."&lt;/td&gt;";
          echo "&lt;td width='150'&gt;".$row['genre']."&lt;/td&gt;";
          echo "&lt;td width='150'&gt;".$row['LastViewed']."&lt;/td&gt;";
          echo "&lt;td width='150'&gt;".$row['Location']."&lt;/td&gt;";
      echo "&lt;/tr&gt;";
  
  }
  echo "&lt;/tr&gt;";
  echo "&lt;/table&gt;";
  echo "&lt;br&gt;";
  echo "
      &lt;form&gt;
          &lt;p&gt;Please Enter a Movie Title&lt;/p&gt;
          &lt;input type='text' name='new_movie' /&gt;
          &lt;input type='submit' value='Submit' /&gt;
      &lt;/form&gt;";
  echo "
      &lt;form&gt;
          &lt;p&gt;Please Enter the Genre&lt;/p&gt;
          &lt;input type='text' name='movie_genre' /&gt;
          &lt;input type='submit' value='Submit' /&gt;
      &lt;/form&gt;";
  echo "
      &lt;form&gt;
          &lt;p&gt;Please Enter the Last View Date&lt;/p&gt;
          &lt;input type='text' name='last_view' /&gt;
          &lt;input type='submit' value='Submit' /&gt;
      &lt;/form&gt;";
  echo "
      &lt;form&gt;
          &lt;p&gt;Please Enter the Location&lt;/p&gt;
          &lt;input type='text' name='movie_loca' /&gt;
          &lt;input type='submit' value='Submit' /&gt;
      &lt;/form&gt;";
  
  
  
  
  $pdo = null;
  </code></pre>
  
  <p>?></p>
  
  <p>this is the new updated code.  I am trying to use the inputs to enter data into my database.
  I have researched how to do this, but so far I haven't got anything to work.  Any thoughts?  Also would it be easier for me to use include and make the inputs in html? if so could i use them to enter the data into the db?</p>