DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
HomeRegisterMembershipsGetting StartedDomain Tools Domain EbooksSEO Software Domain Resellers Advertise

Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Coding/Programming/Languages
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 03-24-2008, 02:49 PM   #1 (permalink)
Platinum Lifetime Member
No Avatar
 
Last Online: 06-12-2008 10:50 PM
iTrader: (4)
Join Date: Mar 2007
Posts: 28
DNF$: 160
Location: usa
Country:


Looking For Help With Contact Form

Hi

I need some help with a php style contact form.

I tried to find a few free ones with no luck.

Its for a site I own and I need a contact form on the site.

Any help is appreciated.
domainpark is offline   Reply With Quote
Sponsored Ads
Old 03-24-2008, 07:52 PM   #2 (permalink)
Platinum Lifetime Member
 
Makis77's Avatar
 
Name: Makis
Last Online: Today 06:24 AM
iTrader: (9)
Join Date: Sep 2006
Posts: 717
DNF$: 365
Location: Glifada
Country:

Send a message via MSN to Makis77

i found a free one that works,
pm me for more.
__________________
All offers are valid for 24 hours(1 day) from the posting time
HARD.TV ~ BUDO.TV ~ KAUAI.TV
ECOSYSTEMS.TV ~ WILDANIMALS.TV ~ WANDER.TV
Makis77 is offline   Reply With Quote
Old 04-27-2008, 07:49 AM   #3 (permalink)
Web Designer
 
MikeK's Avatar
 
Name: MK
Last Online: Yesterday 08:04 PM
iTrader: (11)
Join Date: Aug 2006
Posts: 277
DNF$: 2,504
Location: MI / NYC
Country:

Send a message via Yahoo to MikeK


Why use a free one when a little code can have your form up and running. I'm gonna go out of my way and show you how it's done, whether you read this and learn from it is up to you, hope this helps someone who reads it in the future.

[in the contact page or the page in which you want to present your form, add the folowing]
<form method="post" action="contact.php"> -- [contact.php being the file we will create later]
[Add your fields in here]
Demo Field <INPUT TYPE="text" NAME="demo" SIZE="10"> [this is an example of how one of your fields would look like, remember to add a Name tag]
<input name="submit" type="submit" value="Submit" /> [add this after you have inserted all your form fields above]
</form> -- [close your form, obviously]

Now the part most people screw up on. It's simple and easy to understand.

First, create a file called contact.php as stated above. (create an ok.htm page this will be the page the user is redirected to if the form is sent successfully. Create an error.htm page also with a custom error message or the form with highlighted fields that should have been filled if the form is not sent)

Add the following into contact.php:
PHP Code:
<?php
$EmailTo 
"youremail@yourdomain.com";
$demo Trim(stripslashes($_POST['demo'])); 

$Body "";
$Body .= "demo: ";
$Body .= $demo;
$Body .= "\n";

$success mail($EmailTo$demo$Body);
if (
$success){
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
}
else{
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>

Hope that helps...
__________________
Professional Logo Design
MikeK is offline   Reply With Quote
Old 05-07-2008, 11:03 AM   #4 (permalink)
Platinum Lifetime Member
No Avatar
 
Name: Jason
Last Online: 02-03-2009 08:34 PM
iTrader: (10)
Join Date: Nov 2006
Posts: 493
DNF$: 5,125
Location: USA
Country:

Send a message via AIM to JRBHosting Send a message via MSN to JRBHosting Send a message via Skype™ to JRBHosting

PM me if you are looking for a professional solution.
JRBHosting is offline   Reply With Quote
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

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



All times are GMT -5. The time now is 08:57 AM.
Copyright @2001-2009 DNForum.com