NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page need help with contact form

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Reply
 
LinkBack Thread Tools
Old 09-10-2010, 02:36 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Sep 2007
Posts: 245
hangman21 is on a distinguished road
 



need help with contact form


here is my code and i want to redirect my thank you page, how can i do that? thanks

<?php
// Contact subject
$subject ="$subject";
// Details
$message="$message";

// Mail of sender
$mail_from="$email";
// From
$header="from: $name <$mail_from>";
????: NamePros.com http://www.namepros.com/programming/676617-need-help-with-contact-form.html

// Enter your email address
$to ='my@email.com';

$send_contact=mail($to,$subject,$message,$header);

// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "www.mywebsite.com/thankyou";
}
else {
echo "ERROR";
}
?>
hangman21 is offline   Reply With Quote
Old 09-10-2010, 05:21 PM   #2 (permalink)
Forum Moderator
 
enlytend's Avatar
Join Date: Aug 2006
Location: USA
Posts: 2,041
enlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond reputeenlytend has a reputation beyond repute
 



Cancer Survivorship
Instead of the "echo" ...
header("Location:www.mywebsite.com/thankyou");

Hopefully you're sanitizing those variables someplace earlier in the code?
__________________
Enlytend Solutions - Internet marketing and web development, specializing in local search optimization
Was my advice helpful? Please consider a small donation to the National Canine Cancer Foundation - a tax deductible 501(c)(3)that directly funds cancer research
enlytend is offline   Reply With Quote
Old 09-21-2010, 01:58 AM   #3 (permalink)
New Member
 
PeterRossy's Avatar
Join Date: Sep 2010
Posts: 4
PeterRossy is an unknown quantity at this point
 



add this to the "additional settings" section:

on_sent_ok: "location.replace('http://www.YOURSITE.com');"
__________________
essay help
custom essay
PeterRossy is offline   Reply With Quote
Reply


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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:27 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger