DEV Community

Cover image for Simple Product enquiry in php with mail function
Rajamanickam
Rajamanickam

Posted on • Edited on

Simple Product enquiry in php with mail function

Create simple form in the fields of Name, Email, Mobile, Address and Product Count and amount.

Image description

Now, Fetch submitted Time and Date with country wise using PHP

Image description

submitting the form data to the server.

isset($_POST['submit'])

get values submitted via HTTP POST method.

Image description

While submitting form, Inject the current date and time in hidden type

Image description

Next step, Send values in Mail using php mailto function
PHP mail() function is used to send email in PHP. You can send text message, html message and attachment with message using PHP mail() function.

mailto(to, subject, header, message);

When you send a text message using PHP then all the content will be treated as simple text. Even if you will include HTML tags in a text message, it will be displayed as simple text and HTML tags will not be formatted according to HTML syntax.

Image description

Adding simple css for styling..

Preview:
Image description

Email Data:
Image description

Github : https://github.com/erajamanickam/product-enquire-php-with-mail
Demo : https://erajaman.000webhostapp.com/product-enquire/
Youtube : https://www.youtube.com/watch?v=M_ByzcrmHjQ

Top comments (0)