War Room

Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Featured Warrior Special Offer...
"Members Of The *War Room* Discover Secrets To Immediate Success!"
Reply
 
LinkBack Thread Tools
Old 10-26-2009, 07:43 PM   #1
Warrior Member
War Room Member
 
carbee57's Avatar
 
Join Date: Feb 2007
Location: New York , USA.
Posts: 8
Thanks: 0
Thanked 2 Times in 2 Posts
Social Networking View Member's YouTube Profile
Contact Info
Send a message via Skype™ to carbee57
Default Article Form

Can anyone suggest a very simple script that I can incorporate into my site for viewers to submit articles? This can be done via email it doesn't have to be complicated. The only thing that I would like is to have an html or text input so that articles can be edited on the fly.

Any help would be appreciated.

www.homebusinessresearch.com
Home Business help and resources.
carbee57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-26-2009, 08:45 PM   #2
HyperActive Warrior
War Room Member
 
Bruce Hearder's Avatar
 
Join Date: May 2004
Location: Perth, Australia.
Posts: 406
Thanks: 2
Thanked 63 Times in 55 Posts
Social Networking View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Bruce Hearder
Default Re: Article Form

Hi..

An HTML form cannot send email. So to get the content out of an form and sent somwhere else (via email or whatever), it will have to go via a script that runs on your webserver.
This script will have be be something like a PHP or ASP script.

Below is the HTML code for a form that will display a form on a webpage (just insert code betwteen the <body> </body> tags of your html file, and then the following code will take the results of this form and email it to you.

Please note; the PHP code is very basic, is does not error checking. It just takes the content and sends it to you. Nothing more!!

It should be enough to get you going.

Of cousre you will need to change the email address to the one you want to use.
Replace the phrase

PUT_YOUR_EMAIL_ADDRESS_HERE

with your email address. Make sure the email address is surrounded by dingle quotes (the ' symbol)


I hope this helps

Bruce

----------------- HTML CODE OF FORM ------

<form method="POST" action="addarticle.php">
<table align="center" border="0" cellspacing="0" cellpadding="10" bgcolor="#FFFFFF">
<tr>
<td valign="top" colspan="2">
<p align="center"><b><font face="Verdana" size="6">Add An Article</font></b></td>
</tr>
<tr>
<td valign="top"><font face="Verdana" size="2">Article Title</font></td>
<td><font face="Verdana"><input type="text" name="article_title" size="44"></font></td>
</tr>
<tr>
<td valign="top"><font face="Verdana" size="2">Author's Full Name</font></td>
<td><font face="Verdana"><input type="text" name="author_name" size="44"></font></td>
</tr>
<tr>
<td valign="top"><font face="Verdana" size="2">Text<br>
&nbsp;</font></td>
<td><font face="Verdana"><textarea rows="18" name="article_text" cols="56"></textarea></font></td>
</tr>
<tr>
<td valign="top"><font face="Verdana" size="2">First Name</font></td>
<td><font face="Verdana"><input type="text" name="firstname" size="44"></font></td>
</tr>
<tr>
<td valign="top"><font face="Verdana" size="2">Last Name</font></td>
<td><font face="Verdana"><input type="text" name="lastname" size="44"></font></td>
</tr>
<tr>
<td valign="top"><font face="Verdana" size="2">Your Email Address</font></td>
<td><font face="Verdana"><input type="text" name="email" size="44"></font></td>
</tr>
<tr>
<td colspan="2" align="center">
<font face="Verdana">
<input type="submit" value="Submit Article" name="submitarticle"></font></td>
</tr>
</table>
</form>

----------------------

Cut and paste the following code into notepad, and then save as addarticle.php and FTP up to your server, and put in the same directory as your form is going to be in..


----------------------------------- PHP CODE -------
<?php

if (isset($_POST['submitarticle']))
{
$subject = 'New Article';
$adate = date("F j, Y, g:i a");
$email = 'PUT_YOUR_EMAIL_ADDRESS_HERE';
$text = trim($_POST["article_text"]);
$text = nl2br(wordwrap($text,60));
$message = '<html>
<head>
<title>'.$subject.'</title>
</head>
<body>
<p> Hi,</p>
<p></p>
<b>First Name :</b>'.$_POST["firstname"].'<br>
<b>Last Name :</b>'.$_POST["lastname"].'<br>
<b>E-mail :</b>'.$_POST["email"].'<br>
<b>Date Submitted :</b> '.$adate.'</br>
<p></p>
Has submitted article : <b>'.$_POST["article_title"].'</b><br>
<b>Author\'s Name : </b>'.$_POST["author_name"].'<br>
<b>Text:</b><br>'.$text.'<br>
<br>
</body>
</html>';
$headers = "MIME-Version: 1.0\r\n";

$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
mail($email, $subject, $message, $headers);
echo 'All done<br>';
}
?>

Get Indexed Faster, Visit PingMe Now!!, and get a FREE backlink as well!
Get Instant BackLinks To Any Site You want by running your own Blog Farm
Stop Google SideWiki from displaying unfavorable comments on your WordPress Blog. Beta testers needed for Wordpress Plugin : SideWiki Blocker
How I Get 50-150 1-way links per day, everyday : Find out what I do!
Bruce Hearder is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-27-2009, 01:08 PM   #3
Warrior Member
War Room Member
 
carbee57's Avatar
 
Join Date: Feb 2007
Location: New York , USA.
Posts: 8
Thanks: 0
Thanked 2 Times in 2 Posts
Social Networking View Member's YouTube Profile
Contact Info
Send a message via Skype™ to carbee57
Default Re: Article Form

Thanks for the help.

www.homebusinessresearch.com
Home Business help and resources.
carbee57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
article, form

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 02:02 PM.