Looks like you've got a syntax error trying to concatentate strings.

$msg = "Sender Name:\t" . $_POST['sender_name'] . "\n";

(notice the dots there inbetween the quotes... it's easier to see when you
have an editor that has syntax highlighting).

-Dash

If all the world's a stage, I want to operate the trap door.
                -- Paul Beatty

On Mon, 23 Sep 2002, Carl Caamano wrote:

> What I really would like to know is how do I change this line to a PHP4
> compatible line without having the register_global set to on.
> The orginal code is
>
> $msg = "Sender Name:\t $sender_name\n";
>
> I've tried these:
>
> $msg = "Sender Name:\t $_POST['sender_name']\n";
> $msg = "Sender Name:\t" $_POST['sender_name'] "\n";
> $msg = "Sender Name:\t"+ $_POST['sender_name']+ "\n";
> The first two I get a parse error, the last I get the value 0. I can easily
> do $msg = $_POST['sender_name']; , but some how I can't get it to work with
> text added. I even figured out an echo statement by doing echo "blah
> blah",$_POST['varible']."blah". However it doesn't work for assigning a
> varible. perhaps $msg = "blah"; $msg .= $_POST['varible']; $msg .="blah
> blah" would work? I haven't tried that yet.  I am assuming .= is some sort
> of appending or concatintating operator.
> "Matt Kynaston" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Like I said, I'm lazy too. I guess the security risks are down to giving
> any
> > user the chance to set any variable on your page to whatever they feel
> like
> > at the beginning of the script - by simply playing with the
>
> <truncated>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to