I'm a pretty seasoned PHP programmer, but I'm at my wit's end with this problem... it makes no sense to me why this is happening:
I am trying to pass a variable to a function included in an include file and it is NOT happening. Here is the function, included in my codelib.php file (which is outside of the web root):
function send_mail($myname) {
echo "TEST: ".$myname;
}
Here is the call to the function (in a page within the web root):
$fromName = "something cool";
send_mail($fromName);
The output of the function is simply:
TEST:
I was trying to get a mailing script to work, but I've broken it down to this simple of a function. The variable is NOT getting passed. It doesn't make sense because I have other functions in the include file that work fine all over the site. I know this is going to seem like a ridiculous problem to most, but I don't know what else to do right now... I'm lost.
I am trying to pass a variable to a function included in an include file and it is NOT happening. Here is the function, included in my codelib.php file (which is outside of the web root):
function send_mail($myname) {
echo "TEST: ".$myname;
}
Here is the call to the function (in a page within the web root):
$fromName = "something cool";
send_mail($fromName);
The output of the function is simply:
TEST:
I was trying to get a mailing script to work, but I've broken it down to this simple of a function. The variable is NOT getting passed. It doesn't make sense because I have other functions in the include file that work fine all over the site. I know this is going to seem like a ridiculous problem to most, but I don't know what else to do right now... I'm lost.