Created
March 13, 2022 13:34
-
-
Save Dushyantsingh-ds/0123a28e41ef0fc9bf4caaa7e91296b4 to your computer and use it in GitHub Desktop.
PHP Contact-Form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?PHP | |
| $top = "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html>"; | |
| $bottom = "<body></body></html>"; | |
| $blank = ' '; | |
| $sep = "\r\n"; | |
| $subject = $_POST['subject']; | |
| $name = $_POST['name']; | |
| $email = $_POST['email']; | |
| $phone = $_POST['phone']; | |
| $message = $_POST['message']; | |
| $contact = $_POST['email'] .$blank .$_POST['phone']; | |
| $body = $name .$sep .$email .$sep .$phone .$sep .$subject .$sep .$message; | |
| mail('[email protected]',$subject, $body); | |
| echo ("Thank you for contacting us, " .$name."<br> Your message: <b>"); | |
| echo $subject; | |
| echo "</b>, has been recieved</br> A response will be sent to you in a timely fashion. <br><br> Have a wonderful day! <br> -ASDPS"; | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form action="contact_response.php" method="post" name="frm_contact" id="frm_contact"> | |
| <table width="650" border="0" cellspacing="0" cellpadding="1"> | |
| <tr> | |
| <td width="8"> </td> | |
| <td width="638"><table width="90%" height="224" border="0" cellpadding="1" cellspacing="0"> | |
| <tr bgcolor="#FFFFFF"> | |
| <td width="22%"><span class="style4 style1 style4 style6">Name</span></td> | |
| <td width="78%"><input name="name" type="text" id="name2" size="50"></td> | |
| </tr> | |
| <tr bgcolor="#FFFFFF"> | |
| <td><span class="style4 style1 style4 style6">E-Mail</span></td> | |
| <td><input name="email" type="text" id="email" size="50"></td> | |
| </tr> | |
| <tr bgcolor="#FFFFFF"> | |
| <td><span class="style4 style1 style4 style6">Phone</span></td> | |
| <td><input name="phone" type="text" id="phone" size="50"></td> | |
| </tr> | |
| <tr bgcolor="#FFFFFF"> | |
| <td><span class="style4 style1 style4 style6">Subject</span></td> | |
| <td><input name="subject" type="text" id="subject" onBlur="MM_validateForm('name2','','R','email','','RisEmail','phone','','R','message','','R');return document.MM_returnValue" size="50"></td> | |
| </tr> | |
| <tr bgcolor="#FFFFFF"> | |
| <td><span class="style4 style1 style4 style6">Comments</span></td> | |
| <td><textarea name="message" cols="50" rows="5" id="message"></textarea></td> | |
| </tr> | |
| <tr bgcolor="#FFFFFF"> | |
| <td colspan="2"><div align="center"> | |
| <input type="submit" name="Submit" value="Submit"> | |
| </div></td> | |
| </tr> | |
| </table> <p> </p> | |
| </td> | |
| </tr> | |
| </table> | |
| <p> </p> | |
| </form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment