The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Help with simple form and email script
IanTD
post May 5 2012, 02:07 PM
Post #1





Group: Members
Posts: 1
Joined: 5-May 12
Member No.: 17,059



Hello,

This is my first post.

Here's my website: http://imsoliberal.com

I'm trying to create a simple one field form that posts the content directly to an email address.

This is the html for my form:

<table cellspacing="5" align="center">
<tr>
<td>
<img src="http://imsoliberal.com/wp-content/uploads/2012/05/post8.png" />
<form method="post" name="post" action="/email.php">
</td>
<td>
<input type="text" size="100" name="post">
</td>
<td valign="top">
<input type="image" src="http://imsoliberal.com/wp-content/uploads/2012/05/postbutton3.png" name="postbutton" alt="Post!">
</form>
</td>
</tr>
</table>

This is the php script that I uploaded to the root directory:

<?php

$post = $_POST['post'];

$to = "postittotheblog@imsoliberal.com";

mail($to,$post);

?>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 01:18 PM