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