reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia

Sending e-mails with PHP mail() function [1/3]

Type: Code reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia
Sending e-mails with PHP mail() function
Level: Beginner reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia 
Sending e-mails with PHP mail() function
Date: 2006-Dec-05
Sending e-mails with PHP mail() function
Visited: 9146 times
Sending e-mails with PHP mail() function
Rating: Sending e-mails with PHP mail() function
Sending e-mails with PHP mail() function
Author: Ivory Morhuld
You have seen html form whose send e-mails based on content entered in the form and now you want the same form on your web site. Ok, no problem.

Let's start with html file which containing the form where user writes his message and send by pressing the [Send] button.

Please note that we have one input field named "send" with value parameter set to 1. This field we will use later when sending form to server to check that the form is truly sent.

Also in our example we using POST method for sending the data and for action of form we use the same file with form - $_SERVER['PHP_SELF']

<html>
<head>
<title>Sending e-mails with PHP mail() function</title>
</head>
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <input type="text" name="from_name">
    <input type="text" name="from_email">
    <textarea name="message"></text>
    <input type="hidden" name="Send" value="1">
    <input type="submit" value="Send">
</form>
</body>
</html>
You have to know that when in your php.ini register_globals = Off and you receiving data with POST method you have to use $_POST['var_name'] instead $var_name!

<?php
$send
=$_POST['send'];
$from_name=$_POST['from_name'];
$from_email=$_POST['from_email'];
$message=$_POST['message'];
?>
reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia - Sending e-mails with PHP mail() function [1/3] - reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia

Need a specific tutorial? Do not hesitate and submit a request!
Keywords: remote desktop port  change remote desktop port  rdp port number  remote desktop port number  RDP port  function overloading in c++  change RDP port  exception handling in C++  rdp ports  remote desktop ports  function overloading  remote desktop port change  Trillian webcam  windows remote desktop port  remote desktop change port  exception handling c++  how to change remote desktop port  change remote desktop port number  function overloading c++  check my windows version