The problem is that he will not go in cycles. There are several results, and I just repeat the results that I get from them. When I use include, it only displays the first record. It can be done. I tried for each, I tried with an array, I tried just to scroll through the results, because I only grab one field, but it will not check all the results, only the first. Thanks.
$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 include, I get the first result, which includes one page, but I need it to include all pages.
source
share