title: PDO data isn't storing in db
body: <p>I'm going to get straight to the point. I'm building a prototype PHP app using MAMP on my localhost.</p>
  
  <p>I wanted to make it so sign-up conversions are as effortless as possible for the end-user. </p>
  
  <p>So for starters I'm using the fb phpsdk to fetch all the users graph data to build users profiles frictionlessly. I've got it all displaying fine.</p>
  
  <p>However I'm pulling my hair out trying to get the data to successfully store using PDO. I successfully got the code to work using the $_POST method with form inputs prior to me using it to my example below. </p>
  
  <p>I just don't understand why it's not working without the $_POST method. The database is setup fine, like I said I tested it and used the PDO code below.</p>
  
  <p><strong>Storing to DB attempt using PDO</strong></p>
  
  <pre><code>require_once 'fbphpsdk/src/facebook.php'; // include the facebook php sdk
  $facebook = new Facebook(array(
          'appId' =&gt; 'xxxx', // app id
          'secret' =&gt; 'xxxx')// app secret
  );
  $user = $facebook-&gt;getUser();
  if ($user) { // check if current user is authenticated
      try {
          // Proceed knowing you have a logged in user who's authenticated.
          $user_profile = $facebook-&gt;api('/me');
      } catch (Exception $e) {}
  }
  
  $user = "xxxx";
  $pwd = "xxxx";
  
  $odb = new PDO("mysql:host=localhost;dbname=xxxx;", $user, $pwd);
  
  $q = "INSERT INTO users(u_fullname, age, u_location, u_gender, u_bday, u_employer, u_job) VALUES(:u_fullname, :age, :u_location, :u_firstname, :u_gender, :u_bday, :u_employer, :u_job)";
  $query = $odb-&gt;prepare($q);
  $results = $query-&gt;execute(array(
          ":u_fullname" =&gt; $u_fullname,
          ":age" =&gt; $age,
          ":u_location" =&gt; $u_location,
          ":u_gender" =&gt; $u_gender,
          ":u_bday" =&gt; $u_bday,
          ":u_employer" =&gt; $u_employer,
          ":u_job" =&gt; $u_job));
  </code></pre>
  
  <p><strong>The fb user data (PHP)</strong> </p>
  
  <pre><code>$fbuid = $user_profile['id'];
  $u_employer = $user_profile['work'][0]['employer']['name'];
  $u_job = $user_profile['work'][0]['position']['name'];
  $u_firstname = $user_profile['first_name'];
  $u_fullname = $user_profile['name'];
  $u_location = $user_profile['location']['name'];
  $u_gender = ucfirst($user_profile['gender']);
  $u_bday = $user_profile['birthday'];
  
  //explode the date to get month, day and year
  $u_bday = explode("/", $u_bday);
  
  //get age from date or birthdate
  $age = (date("md", date("U", mktime(0, 0, 0, $u_bday[0], $u_bday[1], $u_bday[2]))) &gt; date("md") ? ((date("Y")-$u_bday[2])-1):(date("Y")-$u_bday[2]));?&gt;
  </code></pre>
  
  <p>Any ideas?</p>