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
File:
<?php
include('connection.php');
$result = $dbc->query("SELECT subdivision FROM Residential");
$search['subdivision'] = array();
while($i = $result->fetch_array()){
echo $i['subdivision'];
array_push($search['subdivision'], $y = $i['subdivision']);
}
?>
<form action="test.php" method="post">
<input type='submit' value='search' class='submit' name='search' /></form>