PHP: Fatal error after a form POST
<p>The following code throws an error in PHP 5.2.9 after submission, but not on the original load.
Error: Fatal error: Only variables can be passed by reference in /home/golfcom/public_html/test.php on line 12</p>

<p>File:</p>

<pre><code>&lt;?php
include('connection.php');
$result = $dbc-&gt;query("SELECT subdivision FROM Residential");
$search['subdivision'] = array();

while($i = $result-&gt;fetch_array()){
    echo $i['subdivision'];
    array_push($search['subdivision'], $y = $i['subdivision']);
}
?&gt;
&lt;form action="test.php" method="post"&gt;
&lt;input type='submit' value='search' class='submit' name='search' /&gt;&lt;/form&gt;
</code></pre>
