what's wrong with my coding?please help.
<?php
$a= $_POST['ques'];
$sql="SELECT * FROM $question WHERE question=$a";
$query=mysql_fetch_array($sql);
while($result=mysql_fetch_array($query)){
$result['id'];
}
?>
or this one
<?php
$sql="SELECT * FROM $question WHERE question='".$_POST['ques']."'";
$query=mysql_fetch_array($sql);
while($result=mysql_fetch_array($query)){
$result['id'];
}
?>