Suhacini 0 Junior Poster in Training

Hi,
I have a table docque where I have 3 fields in it. Id,quest,answ.I will enter question and display it when I click on that question answer must be shown.Here is my code:

<?php
include ("conn.php");

$str='SELECT * FROM docque ';
$res=mysql_query($str);

if($res)
{
while($data=mysql_fetch_array($res,MYSQL_ASSOC))
 {
   echo '<tr>';
    echo ' <td> <a href="'.$data['answ'].'" >' .$data['quest'].' </a></td> ';
   echo '</tr>';
 }
 
}
else
 echo 'Failure'; 
mysql_close($con);
?>

How can I get that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.