i'm trying to get a use a value from a query to use in an input type tag, but i'm not sure how, can anyone help?
this is what i have so far
<?php
$id = $_GET['id'];
$query = "SELECT * FROM questions WHERE quizref = " .$id ;
$question = 'questionno';
$result2 = pg_query($query) or die ("Query failed");
//let's get the number of rows in our result so we can use it in a for loop
$numofrows = pg_num_rows($result2);
?>
<form method="post" action ="editquestions.php">
<?PHP
for($i = 1; $i <= $numofrows; $i++) {
$row = pg_fetch_array($result2); //get a row from our result set
echo '<input type="hidden" name="quizno" value="'.$id.'">
<input type="hidden" name="question" value="'.$question'"> //i want the value to be from the results of the query above
<br/><p>Question '.$row['questionno'].': ' .$row['question'].' <input type="Submit" value="EDIT"> <br/><br/></p>
when i view the source, the input tag has a no value.
Thanks