Okay here is the code im using quite simple stuff basicly it currently pulls one random profile pic along with the users first and last name.
Works like a charm the only thing is how can I make it pull more then at a time
$query = $db->query("SELECT * FROM `content` ORDER BY RAND() LIMIT 1");
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$FirstName = $row['FirstName'];
$LastName = $row['LastName'];
$ProfilePic = $row['ProfilePic'];
$AccountNumber = $row['AccountNumber'];
echo '<a href="Http://MyUrl.Com/Profile.php?AccountNumber=';
echo $AccountNumber;
echo '"><img src="http://MyUrl.Com/Content/';
echo $ProfilePic;
echo '" width="89" height="117" alt="" /></a><span class="des"><br><a href="Http://MyUrl.Com/Profile.php?AccountNumber=';
echo $AccountNumber;
echo '#">';
echo $FirstName .' '. $LastName;
echo '</a></span>';
}
So it pulls one account perfect now I want it where it will pull 8 at once that way I can have $FirstName1 = $row['FirstName']
The reason im doing it this way is because of a formating error so please dont try to give it to me in a loop pull formate or anything just how can I repeat this 8 times without breaking the while loop
and then all the names but right now I have image then name then image then name then image then name – bush man Jan 02 '13 at 03:13