So, I have this piece of text that I would like to come from elsewhere to inside a function. I put it in "configuration.php" and would like to use in a file "functions.php"
configuration.php
$event_confirmation_message = "Your awesome submission has been approved - $link. ";
functions.php
somefunction(several arguments go here){
//code that does other stuff with the function arguments
//then we need to send the confirmation message
global $event_confirmation_message; //to change, see configuration.php
$link = "http://www." . $city . "events.info/index.php?option=events&main_id=" . $row['main_id'];
mail($email, "Please check your your submission", $event_confirmation_message, "From: [email protected]");
}
It all works, the mail is sent, the confirmation message arrives, but $link in the email that is sent is blank (empty, non-defined?). So the local variable $link somehow does not get processed within the global variable $event_confirmation_message. Is there something I am doing wrong?
$linkdefined?$linkhasn't been defined in there. Your question is unclear at this point as to how everything is loaded and supposed to tie in with each other.