User IDNameGroup IDGroup NameDate Created\n"; while ($row = oci_fetch_array($stid, OCI_ASSOC)) { $table .= "\n"; foreach ($row as $item) { $table .= "". $item . "\n"; } $table .= "\n"; } $table .= "\n"; $num_rows = oci_num_rows($stid); // Has to come at the end because the fetch statement has to be first. $mailsubj = $num_rows . $mailsubj; // Put the number of requests into the subject line. $mailbody = "

$mailsubj

\n

 

" . $table; // Put the number of requests into the subject line. oci_free_statement($stid); oci_close($conn); // END ASKING ORACLE FOR INFO ------------------------------------- // Only send email if there's more than one group request. if ($num_rows >= 1) { // Check for success/failure of sending the message. if (mail($mailto, $mailsubj, $mailbody, $mailhead)) { print "

Success

"; } else { print "

Error: Couldn't send the email message.

"; } } } else { print "

Error: This script requires a token value to work.

"; } ?>