Entry
How do I display the results of a db query in a different frame to the one that holds the select statement/php code?
Jan 10th, 2004 06:05
smart ikhu-omoregbe, Chris Hill,
$query = mysql_query("select....");//The select query that
//gives each row as an array
while($row=mysql_fect_row($query)){//the while statement that
// loops around the table
for($i=0; $i < mysql_num_fields($query); $i++)
echo $row[$i].""; //Displaying the results
}
/*Post this with a form action as the processor frame; a hidden input
and a name as element in ENVIRON variable array input.
On the processor frame use the
ENVIRON variables to call the element in arrays
$HTTP_POST_VARS[], $HTTP_GET_VARS[] for older versions or $_POST[],
$_GET[] for newer versions. Then*/
foreach($HTTP_POST_VARS as $indice => $vars)
{
$row[$i] and so on
}
Note: $indice is the key.
I hope this helps ('.')