// 1) Perform Question Query
$query = "SELECT question_ID, question_text ".
"FROM questions where question_ID = '28'";
$result = mssql_query($query) or die('Select Query Error');
?>
<form action="view.php" name="frm" id="frm" method="post">
<fieldset>
<?php
// 1b) Display Results
while($row = mssql_fetch_array($result))
{
// set variable
$question_ID = $row['question_ID'];
echo '<h2>'.$row['question_text'].'</h2>';
}
....
</form>
Processing code...
// declare variables
$ans = $_POST['ans'];
$question_ID = $_POST['question_ID'];
$submit = $_POST['submit'];
if(isset($submit))
{
echo '<p>ANS:'.$ans.'</p>';
echo '<p>ID:'.$question_ID.'</p>';
}
So how do I use that variable once form has been submitted?