please i am trying to assign a while loop result to a string so as to be able to send the list in an email, but cant get it, i tried to echo the string $list but the result came back as with only the last row inserted
$pplresult = mysql_query("SELECT * FROM repplac");
while($row = mysql_fetch_assoc($pplresult)){
$list = $row['Sname'] .$row['Pname'] .$row['Psize'] .$row['Pcolour'] .$row['Pquantity'] .$row['Price'] ;}
echo "$list";
die();
// sending email
$to = $email;
$subject = "YOUR ORDER LIST FROM FINDER";
$headers = "From: donotreply@finder.co.uk";
$body = "$list";
//send emil
mail($to,$subject,$body,$headers);
$transfer = mysql_query("INSERT INTO wishlist SELECT * FROM repplac")or die(mysql_error());
$deletetable = mysql_query("DELETE FROM repplac")or die(mysql_error());
redirect_to('youraccount.php');