Działa nieźle
$to = 'leon@probny.pl';
//define the subject of the email
$subject = "{$row['LEKARZENAZWISKO']} Nazwisko: {$row['NAZWISKO']} Pesel: {$row['PESEL']}";
//define the message to be sent. Each line should be separated with \n
$message = "<html><head><title>BZIUM</title></head><body>\n";
$message .= "<table width=\"50\" height=\"159\">\n";
echo PojedynczyWynik
($row); $message .= "$wynikrob";
$message .= "</table></body></html>";
//define the headers we want passed. Note that they are separated with \r\n
$headers = "MIME-Version: 1.0\r\n"."Content-Type: text/html; charset=UTF-8r\n";
$headers .= "Content-Transfer-Encoding: 8bit";
$headers .= "From: leon@probny.pl\r\nReply-To: leon@probny.pl";
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers ); //if the message is sent successfully print "Mail sent". Otherwise print "Mail failed"
echo $mail_sent ?
"Mail sent" : "Mail failed";
Ślicznie dziękuję.
Mam tylko jeszcze jedno pytanie.
Jeśli chciałbym użyć np. include('http://jakis.pl/mail.php');
W ogóle czy można posłużyć się include ?
Jak do mail.php pobrać funkcję PojedynczyWynik($row);

Przy próbach wychodzi mi
Fatal error: Cal to undefined function PojedynczyWynik() in /var/www/cosik.php on line
9