Hi I am a newbie trying to get some of my first code working, yada yada yada.
I have a drop down box which chooses a state then takes the post data to 'processform2.p hp' to use that to pull up all the rows which have the corresponding state.
I am getting this 'Parse error: syntax error, unexpected T_STRING in /home/attorney/public_html/' on line 13
Thanks a million,
I have a drop down box which chooses a state then takes the post data to 'processform2.p hp' to use that to pull up all the rows which have the corresponding state.
I am getting this 'Parse error: syntax error, unexpected T_STRING in /home/attorney/public_html/' on line 13
Code:
<? $username="XXXXXXXX"; $password="XXXXXX"; $database="XXXXXXXX"; ini_set('display_errors',1); error_reporting(E_ALL); mysql_connect("localhost",$username,$password); @mysql_select_db($database) or die( "Unable to select database"); [B]$query='SELECT * FROM BIZ_APARTMENTS WHERE $_POST('bizState')';[/B] $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); echo "<b><center>Buildings in State</center></b><br><br>"; $i=0; while ($i < $num) { $name=mysql_result($result,$i,"bizName"); $address=mysql_result($result,$i,"bizAddress"); $city=mysql_result($result,$i,"bizCity"); $state=mysql_result($result,$i,"bizState"); $zip=mysql_result($result,$i,"bizZip"); $phone=mysql_result($result,$i,"bizPhone"); $email=mysql_result($result,$i,"bizEmail"); echo "<b>Name: $name</b><br>Phone: $phone<br>Type: $type<br>Address: $address<br>City: $city<br>State: $state<br>Zip: $zip<br>Email:$email<br>"; $i++; } ?>
Comment