StefanRSA Posted February 11, 2009 Share Posted February 11, 2009 ??? - 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??? Link to comment https://forums.phpfreaks.com/topic/144822-solved-mail-the-results-of-mysql_fetch_array/ Share on other sites More sharing options...
StefanRSA Posted February 11, 2009 Author Share Posted February 11, 2009 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???? Link to comment https://forums.phpfreaks.com/topic/144822-solved-mail-the-results-of-mysql_fetch_array/#findComment-759964 Share on other sites More sharing options...
trq Posted February 11, 2009 Share Posted February 11, 2009 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. Link to comment https://forums.phpfreaks.com/topic/144822-solved-mail-the-results-of-mysql_fetch_array/#findComment-759968 Share on other sites More sharing options...
StefanRSA Posted February 11, 2009 Author Share Posted February 11, 2009 Thanks Thorpe, will try and let you know Link to comment https://forums.phpfreaks.com/topic/144822-solved-mail-the-results-of-mysql_fetch_array/#findComment-759971 Share on other sites More sharing options...
StefanRSA Posted February 11, 2009 Author Share Posted February 11, 2009 WHOPEEEEEEEEEEEEE!!!!!!! Knew it would be easy! Thanks Thorpe!!!! Link to comment https://forums.phpfreaks.com/topic/144822-solved-mail-the-results-of-mysql_fetch_array/#findComment-759976 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.