Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 07-08-2016, 12:35 AM   #1
Dubey675
Registered User
 
Join Date: Jul 2015
Posts: 260
How to submit PHP contact form to an email

Hello folks,

How to submit PHP contact form to an email.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Dubey675 is offline   Reply With Quote

Old 07-08-2016, 04:44 AM   #2
Alizine
Registered User
 
Join Date: May 2016
Posts: 14
Basic PHP email() function code

Below is the code for the basic email function.


Code:
<?php
//if "email" variable is filled out, send email
  if (isset($_REQUEST['email']))  {
  
  //Email information
  $admin_email = "someone@example.com";
  $email = $_REQUEST['email'];
  $subject = $_REQUEST['subject'];
  $comment = $_REQUEST['comment'];
  
  //send email
  mail($admin_email, "$subject", $comment, "From:" . $email);
  
  //Email response
  echo "Thank you for contacting us!";
  }
  
  //if "email" variable is not filled out, display the form
  else  {
?>

 <form method="post">
  Email: <input name="email" type="text" /><br />
  Subject: <input name="subject" type="text" /><br />
  Message:<br />
  <textarea name="comment" rows="15" cols="40"></textarea><br />
  <input type="submit" value="Submit" />
  </form>
  
<?php
  }
?>
Alizine is offline   Reply With Quote
Old 01-29-2020, 02:25 AM   #3
arianagrand
Registered User
 
Join Date: Feb 2014
Posts: 197
<form action="test.php" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="29%" class="bodytext">Your name:</td>
<td width="71%"><input name="name" type="text" id="name" size="32"></td>
</tr>
<tr>
<td class="bodytext">Email address:</td>
<td><input name="email" type="text" id="email" size="32"></td>
</tr>
<tr>
<td class="bodytext">Comment:</td>
<td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
</tr>
<tr>
<td class="bodytext"> </td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
</tr>
</table>
</form>
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
arianagrand is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to submit html code with php? eigeehte Programming General 2 05-26-2014 09:00 PM
Contact Form woodyciser Graphic Design 0 12-26-2013 01:24 AM
Contact form script problems ncjbhd HTML / DHTML 0 10-24-2011 08:42 PM
form to file script. php or html mjvndhsb PHP / mySQL 0 10-07-2011 08:55 PM


All times are GMT -7. The time now is 04:41 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.