HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Email "submit" button
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Tools
View previous topic :: View next topic  
Author Message
lilryno



Joined: 27 May 2005
Posts: 1

PostPosted: Fri May 27, 2005 9:48 am     Email "submit" button Reply with quote

Hello,

I'm trying to figure out how I can made a submit button placed on an email so that when the user opens the email, they see the button, can click the button and then an action is done.

What I need is for the submit click to send info back to my server in some fashion.

What would be perfect would be if the user clicked the "submit" button and an email response was sent from the users account behind the scenes. Or if that can't be done, if clicking the submit button brought up a "reply" email already filled out so that the user could just click "send" that would be great too.

Is any of this possible with an HTML email? Thanks much.
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Fri May 27, 2005 11:11 am     Reply with quote

You can use a HTML email to send a form.

It may be blocked though due to Security software then people use.
Your emails will probably be put straight to a blacklist.


Code:

<?php
$to  = 'youatyou.com';

$subject = 'New Mail';


$message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>

<body>
<form name="form1" id="form1" method="post" action="http://www.degs.co.uk/test/php/_mail/contact_form.php">
<table width="400" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Name</td>
    <td>
      <input type="text" name="name" />
    </td>
  </tr>
  <tr>
    <td>Email</td>
    <td><input type="text" name="email" /></td>
  </tr>
  <tr>
    <td>Comment</td>
    <td><textarea name="comment"></textarea></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="Submit" value="Submit" /></td>
  </tr>
</table>
</form>
</body>
</html>
';

$headers  = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";


//$headers .= 'To: You <youatyou.com>, me <meatme.com>' . "\n";
$headers .= 'From: me <meatme.com>' . "\n";


mail($to, $subject, $message, $headers);
?>
Zeckel



Joined: 03 Jun 2005
Posts: 1

PostPosted: Fri Jun 03, 2005 8:50 am     Reply with quote

Do you put that entire code into a submit button?
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Fri Jun 03, 2005 9:35 am     Reply with quote

No. that is a PHP script to send a HTML email.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Tools All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial