Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Bidding Directory   Improve your ranking, submit to directories   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 08-16-2006, 01:58 PM   #1 (permalink)
Inactive
 
Join Date: 08-16-06
Posts: 4
iTrader: 0 / 0%
Latest Blog:
None

sapphirerodent is liked by many
Help w/ comment box using

Ok. So i'm new to web design, and I've got dreamweaver 8. I'm almost done with this website, and I have a problem. I have the setup for a form:

Name
Email
Phone #
Comments

the code looks like this:

<input type="text" class="form" value="your name"><br>
<br style="line-height:1px ">
<input type="text" class="form" value="phone #"><br>
<input type="text" class="form" value="e-mail"><br>
<br style="line-height:2px ">
<textarea class="textarea" cols="5" rows="5">comments</textarea><br>
<br style="line-height:8px ">
<div style="margin-left:159px "><input name="" type="image" src="images/reset.gif">
<input name="Input" type="image" src="images/submit.gif" style="margin-left:24px ">

Now the reset button works fine. How do I make it when a user clicks the "submit" image that it will put all the information together in an email format and will email to an address that I choose?

Any help here would be great! thanks guys.
sapphirerodent is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 08-18-2006, 07:18 AM   #2 (permalink)
Inactive
 
Mrblogs's Avatar
 
Join Date: 03-29-06
Posts: 548
iTrader: 0 / 0%
Mrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really nice
Send a message via MSN to Mrblogs Send a message via Yahoo to Mrblogs
What backend are you using?

PHP/ASP or what?
Mrblogs is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-18-2006, 05:15 PM   #3 (permalink)
Inactive
 
Join Date: 08-16-06
Posts: 4
iTrader: 0 / 0%
Latest Blog:
None

sapphirerodent is liked by many
php
sapphirerodent is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-18-2006, 08:56 PM   #4 (permalink)
Inactive
 
Join Date: 08-09-06
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

pcoptimized is liked by many
Below is just one way and please note I didn't test for error checking, but should work for you.

First, in your form page you'll want to wrap those input tags with the form tag. IE: <form method="post" name="contactForm" action="formProcess.php"> if you haven't already.
Put 'name="name" and name="phone", etc. in each of your input tags next to your value="...".

In formProcess.php use something like this:
PHP Code:

<?
# strip nasties that somebody could have tried injecting

$namestrip_tags($_POST['name']);
$email strip_tags($_POST['email']); 
$phone strip_tags($_POST['phone']); 
$comment strip_tags($_POST['comment']);

// Email address to send to...
$mailto "somename@somedomain.com"//change this to your email address you want the form sent.

//Email address sent from...
$mailhead "From: $email \n";

// Email subject
$mailsubject "Contact Form!"

// Email body text for notifications
$mailbody "Here are the details of this email:\n \n \n";
$mailbody .= "$name \n";
$mailbody .= "$email \n";
$mailbody .= "$phone \n";
$mailbody .= "$comment \n";
  
# Double check that email address is good and send form.
if (!eregi("\n",$email)) { 
mail($mailto$mailsubj$mailbody$mailhead);
}

# Do some type of redirection or just say "Thank You, form has been submitted"
?>
Much more could be done with it, but this is a simple start that should do the trick.
pcoptimized is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
your comment potchie Forum Lobby 8 06-30-2007 02:02 AM
Comment awall19s brother Google Forum 1 01-09-2005 04:56 PM
What about the comment tag <!-- ? fairyjo SEO Forum 10 10-30-2003 09:15 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:52 PM.
© Copyright 2008 V7 Inc