Re: HP syntax error, unexpected T_variable [message #179890 is a reply to message #179889] |
Mon, 17 December 2012 17:19 |
M. Strobel
Messages: 386 Registered: December 2011
Karma:
|
Senior Member |
|
|
Am 17.12.2012 18:08, schrieb Twayne:
> I'm still fighting the error message below over two days now. I'm back again
> hopefully
> simplifying my question to get more answers. So far I've had no hint what
> the syntax error is. As a neophyte I'm trying to work down thru one problem
> at a time so it's a learning experience, too. I've looked at several other
> scripts and they seem to do the same thing I'm doing.
> PHP 5.3.5 on XP Pro SP3+, Apache 2.2 local server.
>
> ------------------------
>
> <?php
> if(isset($_POST['email'])) {
>
> $email_to=me(at)example(dot)com;
> /*
> Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\send.php
> on line 5
> */
> ...
> ?>
> ----------------------------
There must be something wrong with your installation. Or you are execting a different
php file than you think.
strobel@s114-intel:~> php -a
Interactive shell
php > $_POST['email']= 'cc(at)example(dot)com';
php > if (isset( $_POST['email'])) { $to_1 = $_POST['email']; $to_2 = 'me(at)example(dot)org';}
php > echo "I send mails to $to_1 and $to_2 \n";
I send mails to cc(at)example(dot)com and me(at)example(dot)org
/Str.
|
|
|