The problem is it won't loop. There are multiple results and I just echo the results I get all of them. When I use include, it only displays the first record. Can this be done. I've tried for each, I've tried with array, I've tried just rolling through the results because I'm only grabbing one field, but it won't roll through all results, only the first one. Thank you.
$connection = mysql_connect($host,$user,$pass);
mysql_select_db($dbname);
$sqlr = "select qNumber from regquestions ORDER BY RAND() LIMIT 0,5";
$query = mysql_query($sqlr);
//$result = mysql_query($sqlr);
while ($rows = mysql_fetch_array($query))
{
include ("q".$rows['qNumber'].".php");
}
using Echo I get this on the page:
q22.phpq3.phpq17.phpq13.phpq4.php
Using the include I get the first result which is to include one page, but I need it to include all of the pages.