title: php insert prepared stmt
body: <p>My code looks like:</p>
  
  <pre><code>$sql_ = $this-&gt;db-&gt;prepare("SELECT * FROM user");
          $sql_-&gt;execute();
          $user = $sql_-&gt;fetchAll();
  
          $sql_insert_blog = $this-&gt;db-&gt;prepare("INSERT INTO
                                                blog
                                                (blog_title,blog_author,blog_content,blog_tags,blog_create,blog_update)
                                                VALUES
                                                (:1,:2,:3,:4,:5,:6)");
          $sql_insert_blog-&gt;execute(array(
                                          ":1"=&gt;$title,
                                          ":2"=&gt;$author,
                                          ":3"=&gt;$content,
                                          ":4"=&gt;$tags,
                                          ":5"=&gt;$date_create,
                                          ":6"=&gt;$date_update
                                          ));
  </code></pre>
  
  <p>So the first sql statement is to proof if the database coneccion is active. It works when i use</p>
  
  <pre><code>print_r($user)
  </code></pre>
  
  <p>Th second one is the statement thats not been executed.</p>
  
  <p>I have a controller that calls this function on a model, and gives all the info from the form to this function like</p>
  
  <pre><code>function newBlogEntry()
  
  
  {
  
  $title = $_POST["input_blog_title"];
  $author = $_POST["input_blog_author"];
  $content = $_POST["input_blog_content"];
  $tags = $_POST["input_blog_tags"];
  $date_create = date('m/d/Y h:i:s a', time());
  $date_update = $date_create;
  
  $this-&gt;model-&gt;newBlogEntry($title,$author,$content,$tags,$date_create,$date_update);
  
  
  }
  </code></pre>
  
  <p>and the function on this model is actually called. i can select all users from db.</p>
  
  <p>i allready checked all the parameters, and also every parameter can be null so, even if the form is emtpy it should be a insert in the database(This is just for testing).</p>
  
  <p>But there is no entry in the database...</p>
  
  <p>So my question is: what am i doing wrong here?</p>