View Full Version : PHP help


jasonlee
01-22-2005, 08:11 PM
I'm somehow doing something wrong can someone help?

$referredby = Trim($_POST[referredby]);
$commentsquestion = Trim($_POST[commentsquestion]);

$Body = "";
$Body .= "referredby: ";
$Body .= "$referredby";
$Body .= "\n";
$Body .= "commentsquestion: ";
$Body .= "$commentsquestion";
$Body .= "\n";

I get the text "referredby:" and "commentsquestion" but the variable isnt getting put in the body variable.

Gilgul
01-24-2005, 04:53 AM
[QUOTE=jasonlee]I'm somehow doing something wrong can someone help?

$referredby = Trim($_POST[referredby]);
$commentsquestion = Trim($_POST[commentsquestion]);

I get the text "referredby:" and "commentsquestion" but the variable isnt getting put in the body variable.[/QUOTE]


$referredby = Trim($_POST['referredby']);
$commentsquestion = Trim($_POST['commentsquestion']);

Should add ' ' for the POST otherwise it will be empty and the results will show nothing.

Hope this helps,