this is the html form to display the the poll question
here the variables poll and question are giving me error plz help with it , im new to php
<html>
    <head></head>
    <body>
    <span style="font-size: 12px;">
    <span style="font-weight: bold; font-size: 14px;">
    Poll #<?php echo $poll; ?>
    </span><br />
    <span style="font-weight: bold"><?php echo $question; ?></span>
    <form action="vote_process.php" method="post">
    <ul style="list-style-type: none;">
    <?php echo $question_list; ?>
    </ul>
    <input name="poll" type="hidden" value="<?php echo $poll; ?>">
    <input name="" type="submit" value="Vote!">
    </form>
    </span>
    </body></html>
//php code-this is where im trying to access database ,i wanna know how to retrieve the value from database and pass to html where the variables are present
<?php
/* Display a vote form. */
require_once("vote_config.php");
$poll= $_POST['poll']; 
if (!is_numeric($poll)) 
die("Invalid poll");
/* Look up the poll in the database. */
$sql = "SELECT P.question, A.answer, A.answer_ID FROM poll P, answer A  WHERE P.ID =".$poll." and A.ID = P.ID";
$result = mysql_query($sql, $db) or die ("mysql error: " . mysql_error());
if (mysql_num_rows($result) == 0) {
die('Invalid poll.');
}
/* If the user has already voted, show the results. */
if ($_COOKIE["poll_voted_$poll"]) {
header("Location: vote_tally.php?poll=$poll");
exit;
}
/* Vote form */
while($row = mysql_fetch_array($result)) {
$question = $row['question'];
$question_list = '<li><input name="answer" type="radio" value='.row['answer_ID'].'> '.$row['answer'] .'</li>';
}
?>
 
     
    