I am having trouble getting a result set to send via email. The email sends when I run the script through firefox and it displays the data contained in the result set but the email message does not show the data... just the number of rows in each result set.
Pass and Login edited out
Also this is the paste of the email result:
2 /n/r
2 /n/r
ANY help is appreciated!
Pass and Login edited out
Code:
<?php
$conn = odbc_connect("HOMES", "", "");
$subject = "Hourly Sales";
$headers = "From: reporting@XXXXX.com" . "\r\n" .
"Reply-To: reporting@XXXXX.com" . "\r\n" .
"X-Mailer: PHP/" . phpversion();
$str_q_1 = "SELECT * FROM hrly_sls WHERE hrly_sls_str = 1 ORDER BY hrly_sls_id";
$res_q_1 = odbc_exec($conn, $str_q_1 );
$res_1 = ODBC_RESULT_ALL($res_q_1);
$str_q_3 = "SELECT * FROM hrly_sls WHERE hrly_sls_str = 3 ORDER BY hrly_sls_id";
$res_q_3 = odbc_exec($conn, $str_q_3 );
$res_3 = ODBC_RESULT_ALL($res_q_3);
$message = "$res_1 /n/r
$res_3 /n/r";
$result = mail('bdavis@ashleyjax.com', $subject, $message, $headers );
if ( $result );
echo('Messages were sent to the mail server for processing.' );
?>
Also this is the paste of the email result:
2 /n/r
2 /n/r
ANY help is appreciated!