This may be a simple question for you folks. I have studied books up and down but still no solution.
I have collected some inputs from a form, name and email. Then i have some items from a session input. I can show the result on the screen but I want to mail the session arrays to my mail adr.
The $line could be several lines. Echoing this shows each lines with product id, name and price and all the lines.
Sending the $line in a mail shows the last line, so i think the other lines has been wtitten over. Can someone give me a hint how to make a text string for mail purposes with the rest of the lines ?Yes I have tried for some nights now
[php]
session_start();
$session=session_id();
header(“Cache-control: private”); //IE 6 Fix
if (isset($_SESSION[“item_count”]) && $_SESSION[“item_count”] > 0) {
$total = 0;
for($i=0; $i<$_SESSION[“item_count”]; $i++) {
$ident=$_SESSION[‘items’][$i][0];
$name=$_SESSION[‘items’][$i][1];
$pri=$_SESSION[“items”][$i][2];
$pieces=$_SESSION[“items”][$i][3];
$line="$ident -,$name, Price:$pri,-,Pieces:$piecesn";
echo “$lines”;
}
The mail functin is ok, I am receiving without problem but onely one line.
[/php]