Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-04-2006, 06:50 PM   PM User | #1
finstah1
Regular Coder

 
Join Date: May 2004
Location: The First State
Posts: 233
Thanks: 9
Thanked 0 Times in 0 Posts
finstah1 is an unknown quantity at this point
form data not sending to e-mail

I'm using this to forward my form data to an email based on CAPTCHA entry being correct:

PHP Code:
if ( $can_send == ) {    
  
header('Location: http://www.mysite.com/cgi-bin/mail.php');
  } 
else {
header"Location: " .$_SERVER['PHP_SELF'] );

If chars match I want the data sent to the mysite link, if the chars don't match it tells the user to re-enter the CAPTCHA text.

I'm not sure if header is correct, I'm new to PHP so I don't know what else to use. Is this just a redirect or something? Because the data doesn't get sent.

I have about 35 fields on the form so I don't want to add $name, $email, etc as a query string. Is there another way to foward the data?

thanks for any help
finstah1 is offline   Reply With Quote
Old 05-04-2006, 09:41 PM   PM User | #2
goughy000
Regular Coder

 
goughy000's Avatar
 
Join Date: Nov 2005
Location: England
Posts: 415
Thanks: 0
Thanked 0 Times in 0 Posts
goughy000 is an unknown quantity at this point
er.. dont forward?

PHP Code:
function sendmailfunction(){
  
// Put your mail.php code here
}

if (
$can_send == 1){     
  
sendmailfunction();
}else{ 
   
header"Location: " .$_SERVER['PHP_SELF'] ); 

__________________
PHP Freelancing!
ByteForums!
Scriptlance.comNeed a job done quick? post it on scriptlance! OR! your a programmer? sign up and get paid for these jobs!
goughy000 is offline   Reply With Quote
Old 05-05-2006, 03:15 PM   PM User | #3
degsy
Senior Coder

 
Join Date: Nov 2002
Location: North-East, UK
Posts: 1,265
Thanks: 0
Thanked 0 Times in 0 Posts
degsy is on a distinguished road
or in your mail script change any $_POST or $_GET variables to $_REQUEST
degsy is offline   Reply With Quote
Old 05-05-2006, 07:53 PM   PM User | #4
finstah1
Regular Coder

 
Join Date: May 2004
Location: The First State
Posts: 233
Thanks: 9
Thanked 0 Times in 0 Posts
finstah1 is an unknown quantity at this point
I went a different route and got things working.
finstah1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 04:05 PM.


Advertisement
Log in to turn off these ads.