I am trying to set up a json object.array to retrieve the data from this mysql query. the data required is posted from java and that seems to work fine, but I get parsing errors. I tried testing the php file and I get the "Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\GetVerse.php on line 8" . previously I had a ';' at the end of the sql query and it said unexpected ';' at the end of line 7. now it i get the error message for line 8: $row = mysql_fetch_array($result); . What seems to be the problem?
<?php
mysql_connect("localhost","root","password");
mysql_select_db("hftwmvirtualdb");
$Booknum = mysql_real_escape_string($_POST['Booknum']);
$Chapternum = mysql_real_escape_string($_POST['Chapternum']);
$Versenum = mysql_real_escape_string($_POST['Versenum']);
$result = mysql_query("SELECT VERSETEXT FROM booktable WHERE BIBLEID = '".$Booknum."' AND CHAPTERID = '".$Chapternum."' AND VERSENO = '".$Versenum."' LIMIT 0,1"
$row = mysql_fetch_array($result);
echo json_encode($row);
mysql_close();
?>