title: wsod with php pdo and mysql
body: <p>I am getting a white screen of death with no errors anywhere. var_dump()
   does not seem to help.</p>
  
  <pre><code>    &lt;?php
      $host = "localhost";
      $user = "custdb";
      $pass = "ms";
      $db = "accounting";
      $odb = new PDO("mysql:host=" . $host . ";dbname=" . $db, $user, $pass);
      //insert customer
      if (isset($_POST['name'])) {
              $cust_name = $_POST['cust_name'];
              $cust_addr = $_POST['cust_addr'];
              $cust_phone = $_POST['cust_phone'];
              $cust_email = $_POST['cust_email'];
              $q = "INSERT INTO customer (cust_name,cust_addr,cust_phone,cust_email)
                              SELECT * FROM (SELECT cust_name) as tmp WHERE NOT EXISTS (SELECT cust_name FROM customer WHERE cust_name = '1');";
              $query = $odb-&gt;prepare($q);
              var_dump($cust_name);
              $results = $query-&gt;execute(array(
                      ":cust_name" =&gt; $cust_name,
                      ":cust_addr" =&gt; $cust_addr,
                      ":cust_phone" =&gt; $cust_phone,
                      ":cust_email" =&gt; $cust_email,
              ));
      var_dump($cust_addr);
      var_dump($results);
      }
      ?&gt;
  
  
  &lt;!DOCTYPE html&gt;
          &lt;head&gt;
                  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
                  &lt;title&gt; Contacts Database &lt;/title&gt;
          &lt;/head&gt;
  
          &lt;body&gt;
                  &lt;form methd="post" action""&gt;
                          Name: &lt;input type="text" id="cust_name" /&gt;&lt;br /&gt;
                          Address: &lt;input type="text" id="cust_addr" /&gt;&lt;br /&gt;
                          Phone: &lt;input type="text" id="cust_phone" /&gt;&lt;br /&gt;
                          Email: &lt;input type="text" id="cust_email" /&gt;&lt;br /&gt;
                          &lt;input type ="submit" value"add" /&gt;
                  &lt;form&gt;
          &lt;?php
                  $query = "SELECT * FROM customer";
                  $result = $odb-&gt;query($query);
                  if($result-&gt;rowCount() &gt; 0) {
                          foreach($result as $item) {
                                  echo($item['cust_name'] .",". $item['cust_addr'] .",". $item['cust_phone'] .",". $item['cust_email']."&lt;br /&gt;\n");
                          }
                  }
  
          ?&gt;
  </code></pre>
  
  <p><em><strong></em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em></strong>  output  <strong><em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em></strong></p>
  
  <p>Name: 
  Address: 
  Phone: 
  Email: 
   bob,666 bo rd,2124442222,bo@bo.com</p>
  
  <p><a href="http://i.imgur.com/1hlc6Hm.png" rel="nofollow">http://i.imgur.com/1hlc6Hm.png</a></p>
  
  <pre><code>enter code here
  </code></pre>
  
  <p><em><strong></em>**<em>*</em>**<em>*</em>**<em>*</em>***<em></strong>   sql cli   <strong></em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>****</strong></p>
  
  <pre><code>mysql&gt; INSERT INTO customer (cust_name,cust_addr,cust_phone,cust_email )
      -&gt; SELECT * FROM (SELECT 'bob', '666 bo rd','2124442222','bo\@bo.com') AS tmp
      -&gt; WHERE NOT EXISTS (
      -&gt; SELECT cust_name FROM customer WHERE cust_name='bob')
      -&gt; LIMIT 1;
  Query OK, 1 row affected, 1 warning (0.02 sec)
  Records: 1  Duplicates: 0  Warnings: 0
  
  mysql&gt; select * from customer;                                                  +----+-----------+-----------+------------+------------+
  | id | cust_name | cust_addr | cust_phone | cust_email |
  +----+-----------+-----------+------------+------------+
  |  1 | bob       | 666 bo rd | 2124442222 | bo@bo.com  |
  +----+-----------+-----------+------------+------------+
  1 row in set (0.00 sec)
  </code></pre>