Re: GET / POST
| From: | Carl Caamano | Date: | Mon, 23 Sep 2002 18:51:44 +0000 |
| Subject: | Re: GET / POST | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15961@lists.php.net to get a copy of this message | ||
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" <Matt.Kynaston@etbroker.com> wrote in message
news:BE5DDBE9A328774A91074615783088FA07A480@etbs2k02.etbroker.int...
> 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>