send-form.php - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of send-form.php.php
- <?php
- if (isset($_POST['submit'])) {
- $name = $_POST['name'];
- $email = $_POST['email'];
- $message = $_POST['message'];
- $subject = 'New Contact Form Submission';
- $headers = "From: " . $email;
- $message = "Name: " . $name . "\n" . "Email: " . $email . "\n" . "Message: " . $message;
- mail($to, $subject, $message, $headers);
- echo "Thank you for your submission!";
- }
- ?>
File Description
- send-form.php
- PHP Code
- 26 Jan-2023
- 483 Bytes
You can Share it:
Latest PHP Pastes