|
Posted by matt on 11/11/06 04:49
Pedro Graca wrote:
> matt wrote:
>
>>Pedro Graca wrote:
>>
>>>matt wrote:
>>>
>>>>I can get the name and
>>>>email address to print out normally, just not into the email sending
>>>>body.
>>>
>>>Then, in the mail body, just add those variables;
>>>Where you have (maybe????)
>>>
>>> mail($to, $sub, $body, $xtra);
>>>
>>>replace with
>>>
>>> mail($to, $sub, $body . "\n\n$name $email_address", $xtra);
>>
>>It still isnt working. Is it because I have it inside a function, and
>>the function blocks the variables from outside the function going into
>>the function? I made them global, but it still just prints a blank space.
>>
>>I have
>>
>> $usrname = $_POST["usrname"];
>> $usremail = $_POST["usremail"];
>
>
> Well ... $_POST["usrname"] and $_POST["usremail"] are perfectly fine
> variables. You don't need to copy them to some other variables and use
> the copies instead.
> /And/ the $_POST array is a "super global" array, which means it will
> exist inside functions, included files, or whetever else you can think
> of.
>
> <snip>
>
>> $subject = "File Downloaded: $download";
>>
>> mail($admin_email, $subject, $from_info . "\n\n$usrname $usremail",
>>"From: downloads@--.com.au");
>
>
> Use the super global array instead:
>
> mail($admin_email, $subject,
> $from_info . "\n\n{$_POST['usrname']}\t\t\t\t{$_POST['usremail']}",
> "From: downloads@--.com.au");
>
>
>>Yet the $download seems to pass into the function and display fine!!
>
>
> I'd have to take a look at your script to understand why.
> Maybe tomorrow, no promises.
>
Thanks, I have added in the line you have put there, but it still just
prints a blank space. I appreciate your help.
Navigation:
[Reply to this message]
|