Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
corporalstorm
Hangin' Around



Joined: Nov 06, 2006
Posts: 46

PostPosted: Tue Feb 27, 2007 9:55 am Reply with quote

What did I do wrong? I can't seem to make this work..

I have tried over and over, I can't figure this out!

Code:


<?php

$Name=$_POST['Name'];
$Email=$_POST['Email'];
$Message=$_POST['message'];
$to="removed@lost.com";

if ($Newsletter != False){
   $Future = 'Yes';
} else {
   $Future = 'No';
}

$Message="
Name: $Name
E-Mail: $Email
Location: $Dine
Food Quality: $Quality
Decor: $Decor
Table Service: $Table
Bar Service: $Bar
Host/Hostess: $Host
Overall Quality: $Overall
Where did you hear about us?: $Referral
When did you dine with us?: $When
Would you like to recieve further info in the future?: $Future
Comments: $Comments
";

if(mail($to,"New Comments from removed",trim($Message),"From: removed
<removed>\r\n")) {
   header("location: removedforreason");
} else {
   echo "<h1>Sorry but there is an error. Try again please.</h1>";
}
?>


This works just fine, it emails me etc.. But, I am trying to add this last code snip and it won't work. I created a Div Hidden text box that at the moment has a value set for testing. When I try to put the code in, it doesn't work. It still sends me the email. The way its suppose to work is, if the POST detects a value in the hidden field, it acts as it sent. Way to fool Spambots.

This is the code snip I'm trying to add to the above code.

Code:


$email2 = stripslashes($_POST["email2"]);
if (!empty($email2)) {
header("location: pretend_that_email_sent.php");
}


Any help would be really great! Smile
 
View user's profile Send private message
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue Feb 27, 2007 11:16 am Reply with quote

You should probably post the script you are trying to test, or at least tell us where you are trying to add that new code snippet in the above.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©