3 variables not passing to function!!!????

From: Date: Sun, 01 Feb 2004 03:06:33 +0000
Subject: 3 variables not passing to function!!!????
Groups: php.general 
Request: Send a blank email to php-general+get-176491@lists.php.net to get a copy of this message
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="ryan@coinpass.com"; $the_email="ryan@coinpass.com"; $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

« previous php.general (#176491) next »