android - Parsing a query to php and returning result ERROR T_WHILE -


i trying send query app php code throgh post

<?php $con=mysql_connect("xxx","xxx","xxx");  if (!$con) {     die('could not connect: ' . mysql_error()); }  mysql_select_db("xxx", $con);  $query=$_post['query'];  $result = mysql_query({$query})  while($row = mysql_fetch_assoc($result)) {     $output[]=$row; }    print(json_encode($output)); 

i error:

error on line 15 unexpected t_while 

looks you're missing semi-colon here:

$result = mysql_query({$query}); 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -