title: Capturing a div id value in a php variable
body: <p>I want to capture the value of: <code>&lt;div id="result"&gt;&lt;/div&gt;</code> which keep on changing, into a php variable <strong>$foo</strong> and then insert it into the database. <strong>My codes:</strong></p>
  
  <pre><code>&lt;?php 
  include('config.inc');
  $foo = '&lt;div id="result"&gt;&lt;/div&gt;';
  $query= "INSERT INTO register(name) VALUES('$foo')";
  echo $foo;
  mysql_query($query) or die('An Error occurred' .mysql_error());
  ?&gt;
  </code></pre>
  
  <p><em>The error:</em>
  Value inserted into the db is: </p>
  
  <pre><code>&lt;div id="result"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>, not the value that user has enter... 
  Any help please?</p>