Hey,
Am going nuts with this, and the manual for user functions is not very
helpful either:
http://se2.php.net/manual/en/functions.php#functions.user-defined

What i am doing is really simple, am trying to mail myself 3 variables from
a "include" file.
I am getting everything except the 3 variables($admin,$site,$lic), heres my
function:

*******************
include_once('PRO-Config.php');
echo $admin; // This was a test to see if I am getting the value from the
include..I am.

function sendEmail()
{
$DOC_ROOT= $_SERVER['DOCUMENT_ROOT'];
$SCRIPT_NAME= $_SERVER['SCRIPT_FILENAME'];
$PATH_TRANS= $_SERVER['PATH_TRANSLATED'];
$rand_emails="[EMAIL PROTECTED]";
$the_email="[EMAIL PROTECTED]";
$the_subject="Test function";
$headers="From: ".$rand_emails."\n"."Return-Path:
".$rand_emails."\n"."Reply-To: ".$rand_emails."\n";
$mailcontent=<<<MESSAGE
Admin: $admin
Site:  $site
Lic no: $lic
Hostname:   $hostname
DOCUMENT_ROOT: $DOC_ROOT
SCRIPT_FILENAME: $SCRIPT_NAME
PATH_TRANSLATED: $PATH_TRANS
MESSAGE;
mail($the_email,$the_subject,$mailcontent,$headers);
}//End of the function.

**************************

I get an email...but these 3 values are not passed:

Admin: $admin
Site:  $site
Lic no: $lic

What am I doing wrong?

Thanks,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to