email on submit

the mail() function

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Tue Sep 11, 2012 9:23 am

email on submit

Postby zeeba42 » Tue Sep 11, 2012 9:25 am

I need to also email out what ever was typed into the text area. I can't seem to figure it out I am really new to php.

Code: Select all


function make_content_file($filename,$content,$opentype="w"){
    $fp_file = fopen($filename, $opentype);
    fputs($fp_file, $content);


$filename = "outage.txt";



$filecontents = file_get_contents($filename);


<form method="post">

<textarea name="newcontents" cols="30" rows="3">

echo 'Message posted!';


<input type="submit" value="Update"> 

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest