Sending e-mail with PHP (Feedback form)
Subject: Web development using PHP and MySQL
In the example, we we create a simple feedback form to send or submit user comment or question via the form to our e-mail (contact@tealearn.org).
Below is the code for the contact form.
contact.htm
Company Feedback
This HTML code is a simple form, I structured it using table, as you can see the table is inside the form tag, and it hold or structured the text and form elements. You can also use CSS for this form structure or styling.
Below is the PHP file (contact.php) that the contact.htm form will submit to, the program send the information supplied to our e-mail.
contact.php
Company Feedback
Note:
mail($to,$title,$msg,$headers) line of code i.e mail() function sent the email using the required parameters stored in some variables.
This program will work if you have your email server setup, which must have already been done if you have hosted website online.
By:
Benjamin Onuorah
Login to comment or ask question on this topic
Previous Topic Next Topic