View Full Version : Problems Feedback (PHP Coding)
Raindammit
Sun 28th Nov '04, 1:55am
I was just woundering why the script is not working can some help up thanks.:mad:
It just wont send mail.... http://www.coolconnections.com.au/feedback.php
$Your Name= $_REQUEST['Name'] ;
$E-Mail Address = $_REQUEST['message'] ;
$Title = $_REQUEST['Title'] ;
$Phone Number = $_REQUEST['Phome Number'] ;
mail("feedback@coolconnections.com.au"'"Feedback Form Results",$message, From: $email" );
header("location: http://www.coolconnections.com.au/feedback.html");
Icheb
Sun 28th Nov '04, 12:53pm
1. Don't use spaces in your variable declarations.
2. Don't declare your variables twice. There is no need for something like $Title = $_REQUEST['Title'];
3. Read up on the syntax of mail() on www.php.net .
4. I assume the name, message etc. comes from a form which uses post? Then use $_POST instead of $_REQUEST .
Raindammit
Fri 3rd Dec '04, 2:53am
For some reason the Buttons just push in and not going to my mailthanks page have no clue its driving me in sane atm. tryed everythink...:mad:
jumpD
Fri 3rd Dec '04, 9:17pm
For some reason the Buttons just push in and not going to my mailthanks page have no clue its driving me in sane atm. tryed everythink...:mad:
This is not a php issue. You have your submit buttons after you close out your form </form>. Which of course is why the buttons don't even show up in Firefix. ;)
jumpD
Fri 3rd Dec '04, 9:20pm
By the way, once you get that fixed your going to get this error in mailthanks.php
Parse error: parse error, unexpected ':', expecting ']' /home/cool12/public_html/mailthanks.php on line 36
jblessing
Mon 6th Dec '04, 9:23am
2. Don't declare your variables twice. There is no need for something like $Title = $_REQUEST['Title'];
I disagree with that. If register globals is off, he'll need to make that declaration. ANd, of course, if register globals is on he should still make the declaration for security purposes and also should disable register globals.
Icheb
Mon 6th Dec '04, 9:44am
No, he doesn't "need to make that". I don't do it and I don't have any problems. You could give some actual reasons behind your argument, instead of just saying "should do this and should do that".
Yes, PHP stores the content of variables by reference, so the content of a variable is only stored once even if multiple variables contain that very same content. However, it's still a total waste of processor cycles.
jumpD
Mon 6th Dec '04, 10:22pm
Well, post data, or any user suppled data for that matter, should always be validated.
vBulletin® v3.8.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.