Fatal error: Can't use function return value in write context in
<p>Ok, I'm trying to clean my code from injections, etc,etc. and I'm getting this fatal error:</p>

<p><strong>Fatal error: Can't use function return value in write context in....</strong></p>

<p>Here's the line where it throws the error:</p>

<pre><code>$val=mysql_real_escape_string($val)=$_SESSION['val']=strip_tags($_POST['val']);
</code></pre>

<p>Why is it throwing this error?</p>

<p>UPDATE: ok, thanks for the answers, I moved <code>mysql_real_escape_string($val)</code> to another part in the code, this fixed the error.</p>
