/    Sign up×
Community /Pin to ProfileBookmark

mail() function problem. & Page logo…Please help

? Q1. I want php to automatically send a html format message on a user signup process, which I know how to go about that but my question is, Can I send a message from a .txt or .html file?
What I mean is this, if the message is in a text file(and in the same folder as the processing script), can I call the text or the html file with the $message = “.text.txt”; or $message = “.text.html”; ?
If this is possible, then I will like the message to contain the user form input name and his/her details, such as $_POST[‘fullname’];.
Do I have to call the variables(I mean, if $fullname = $_
POST[‘fullname’]?, $fullname inside the text or html files? For instance:

in a .txt or .html file
{
//Message layout starts

Welcome to Mydomain.com, $fullname.

You are now a full member….
Your details are:
Fullname : $fullname
Address : $address

Thank you.

//Message ends

}

Please help o.

? Q2. I want to know how I can add a logo to a page which will show on the browser top-left. For instance, [url]http://www.webdevelopers.com[/url] has a logo WD on every pages. I know it’s a html tags but please tell me how if you know it.

Thanks. ?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@The_Little_GuyJun 05.2006 — [code=php]$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
$message = fread($fh, filesize($myFile));
fclose($fh);

{
//Message layout starts

Welcome to Mydomain.com, $fullname.

You are now a full member....
Your details are:
Fullname : $fullname
Address : $address

$message


Thank you.

//Message ends

}[/code]
Copy linkTweet thisAlerts:
@itbeingsauthorJun 12.2006 — When I sent the mail, the variables I used in the .txt document doesn't contain their respective values. The mail sent was in the same format as the .txt

Dear $user,


Your Fullname : $fullname

Passphrase : $pass

Email : $email

You can login by clicking on the link

Whereas I wan it to display the full name of each user and not the $...

Please help.
Copy linkTweet thisAlerts:
@bokehJun 13.2006 — [B]Send an HTML file as email[/B][code=php]$headers = <<<END
MIME-Version: 1.0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
From: $from
END;

$to = '[email protected]';

$subject = 'HTML mail test';

$html_file_contents = file_get_contents($html_file);

mail($to, $subject, $html_file_contents, $headers);[/code]
Copy linkTweet thisAlerts:
@itbeingsauthorJun 15.2006 — THis will work if am sending a html document.

What I need is extracting values from a .txt file which is holding some variable and send the files.
Copy linkTweet thisAlerts:
@bokehJun 15.2006 — THis will work if am sending a html document.

What I need is extracting values from a .txt file which is holding some variable and send the files.[/QUOTE]
If you want relevant help you are going to need to post a better explanation.
×

Success!

Help @itbeings spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...