title: Execution of PHP code regarding database access using MongoDB is not giving desired results
body: <p>I am using WAMP server 64bit as well as MongoDB 64 bit in my Windows 7 machine. I have successfully configured MongoDB on WAMP server where <code>php_info()</code> page shows MongoDB Support Version 1.3.2RC1 enabled. But the problem is whenever I establish connection with MongoDB in PHP code the code runs but it does not reflect the changes in MongoDB console. Why is this so?</p>
  
  <pre><code> &lt;?php
   $connection = new MongoClient();
   //$db = $connection-&gt;sample;
  
   // select a collection:
   //$collection = $db-&gt;first;
   $collection = $connection-&gt;sample-&gt;test1;
  
   $doc = array(
   "name" =&gt; "MDB",
   "type" =&gt; "database",
   "count" =&gt; 2,
   "info" =&gt; (object)array( "x" =&gt; 203, "y" =&gt; 102),
   "versions" =&gt; array("0.9.7", "0.9.8", "0.9.9")
   );
  
   $collection-&gt;insert( $doc );
  
   echo "Inserted successfully....";
  
   $document = $collection-&gt;findOne();
   var_dump( $document );
  
   ?&gt;
  </code></pre>
  
  <p>The above code retrieves the inserted document as it is on browser. But in mongo.exe console there is no data inserted. My default database is 'db'.</p>