Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Digital Lifestyle
Web Design and Hosting
PHP form with html?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Murlyn" data-source="post: 32026" data-attributes="member: 184"><p>PHP.net is your best friend! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])</p><p></p><p><?php</p><p>mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");</p><p>?> </p><p></p><p><?php</p><p>mail("nobody@example.com", "the subject", $message,</p><p> "From: webmaster@{$_SERVER['SERVER_NAME']}\r\n" .</p><p> "Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n" .</p><p> "X-Mailer: PHP/" . phpversion());</p><p>?> </p><p></p><p></p><p>So in other words:</p><p></p><p>$subject = "Ebesign Comment" ;</p><p>$from = $_POST["form_email"];</p><p>$name = $_POST['form_name'];</p><p>$to = "liamlorigan@woosh.co.nz";</p><p></p><p>$headers = "From: $from\r\n" . "Reply-To: $from\r\n" . "X-Mailer: PHP/" . phpversion());</p><p></p><p>mail ($to, $subject, $message, $headers)</p><p></p><p></p><p>Cheers!</p></blockquote><p></p>
[QUOTE="Murlyn, post: 32026, member: 184"] PHP.net is your best friend! :) bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]]) <?php mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3"); ?> <?php mail("nobody@example.com", "the subject", $message, "From: webmaster@{$_SERVER['SERVER_NAME']}\r\n" . "Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n" . "X-Mailer: PHP/" . phpversion()); ?> So in other words: $subject = "Ebesign Comment" ; $from = $_POST["form_email"]; $name = $_POST['form_name']; $to = "liamlorigan@woosh.co.nz"; $headers = "From: $from\r\n" . "Reply-To: $from\r\n" . "X-Mailer: PHP/" . phpversion()); mail ($to, $subject, $message, $headers) Cheers! [/QUOTE]
Verification
Post reply
Forums
Digital Lifestyle
Web Design and Hosting
PHP form with html?
Top