Re: Very Weird Behavior
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Very Weird Behavior

From: Alan Little <alan@n-o-s-p-a-m-phorm.com>
Date: Mon Nov 28 2005 - 17:36:19 CET

Carved in mystic runes upon the very living rock, the last words of Sean
of comp.lang.php make plain:

> If you checked the php error log it would have printed out something
> like:
>
> [27-Nov-2005 16:04:12] PHP Parse error: syntax error, unexpected T_IF
> in etc......

Assuming error logging is on, which it isn't in this case, but error
reporting is, and there was no error.

> if ($Phone) $CompanyBlock.= "Tel: $Phone\n".
> if ($Fax) $CompanyBlock.= "Fax: $Fax\n".
> if ($Email1) $CompanyBlock.= "Email: $Email1\n".
>
> Take this section of code, your concatenating IF statements like
> strings so of course it's not going to work.

I understand that. As stated in my original post, the code was initially
a single block of concatenation; I added the if's, and forgot to change
the appropriate dots to semicolons.

> You should start by going to http://www.php.net/manual/en/

Gosh, a whole new world of enlightenment I hadn't seen before!

-- 
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Received on Sat Dec 3 04:23:52 2005