In a simple postgresql database I step through the rows and list the content by name. (se code below)
How can I get the value in $prodArr[namn] into the value-field in a form-control.
The idea is to construct a form that will make it possible click the right button in a form or click on a href-link to take you to
another side that presents you with more info on one of the products in the database.
(the low price, its outstanding virtues-etc)
---- FOR LOOP (this one works) -------
//Use a for-loop to step through number of //rows in the table
for ($index=0; $index<$numRows; $index++) {
// Get each row/array/post
$prodArr = pg_fetch_array ($result, $index);
echo $prodArr[namn];
echo "<br>";
}
--- WHAT I TRY TO DO ----------
echo '<input type="text" name="namn"
value="echo $prodArr[namn];">;
Can anyone point me in the right direction?
Cheers> Max!