pass variable from php script to another php script
| From: | toni baker | Date: | Fri, 04 Jan 2002 19:13:43 +0000 |
| Subject: | pass variable from php script to another php script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-79485@lists.php.net to get a copy of this message | ||
I would like to pass the "$text" variable to the body
of an email message in another php script.
The code is below:
< -- upload.php -- >
if (!$file=fopen(text.txt", "r")) {
echo "Could not open file";
}
else {
$text=fread($file, 100);
fclose($file);
}
< -- mail.php -- >
$to = "web@example.com";
$subj = "The Subject";
$body="\nBegin" .
"\n" . quotemeta ($a) .
"\n" . quotemeta ($b) .
"\n" . quotemeta ($c) .
"\nEnd" .
"\n" . $text;
$header="From: " . $email .
"\r\nReply-To: web@example.com";
$success = mail ($to, $subj, $body, $header);
I can echo the "$text" variable to my web form, but
not
to the email body of another php script. Is this
possible? How can I get the "$text" variable to
display in the body of my email message? Thanks
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com