Jump to content

[SOLVED] Mail the results of mysql_fetch_array


StefanRSA

Recommended Posts

??? - Hi... I am brand spanking new to PHP and need some help.... PLEASE...

My Code:

while($row_id = mysql_fetch_array( $result_id )) {
$inputid=$row_id['update_id'];
$fullrow = $row_id['accom_type'];
${$inputid.'-units'} = $_POST[$inputid.'-units'];
${$inputid.'-adults'} = $_POST[$inputid.'-adults'];
${$inputid.'-children'} = $_POST[$inputid.'-children'];
${$inputid.'-infants'} = $_POST[$inputid.'-infants'];
$full_set = $fullrow.';'.${$inputid.'-units'}.';'.${$inputid.'-adults'}.';'.${$inputid.'-children'}.';'.${$inputid.'-infants'};
}

 

I know it is creating a Loop for $full_set... But I want to email all results of the $full_set loop.

I am sure this is not difficult... Can anybody help please???

I must also add, but you know this... (Sure)...

If I echo $full_set or mail it like:

mail("[email protected]", $key,
"Booking, $$full_set
title, $title
name, $name
surname, $surname", "From: $enq_email");

I only get one result..... I Want all.... HOW??? Please help????

Use...

$full_set .= $fullrow.';'.${$inputid.'-units'}.';'.${$inputid.'-adults'}.';'.${$inputid.'-children'}.';'.${$inputid.'-infants'};

 

within your loop. This will get all the results into $full_set. Then you can use the email code you posted in your last reply.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.