Re: Nested If...Else...
| From: | Matthew Sims | Date: | Sat, 24 Jul 2004 16:53:05 +0000 |
| Subject: | Re: Nested If...Else... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191750@lists.php.net to get a copy of this message | ||
> print out all the values of the vars your comparing.... often youll
> find one of them is not what your expecting
>
> Jason
>
> On Sat, 24 Jul 2004 11:05:06 -0500, Robb Kerr
> <rkerr.news@digitaliguana.com> wrote:
>> What's wrong with this syntax. I just can't see my mistake.
>>
>> if ($vBkgrndImage == "AnswerPage") {
>> if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer'])
>> {
>> $vBkgrndImage = "Bkgrnd-Body-Incorrect.jpg";
>> } else {
>> $vBkgrndImage = "Bkgrnd-Body-Correct.jpg";
>> }
>> }
>>
>> Thanx
>> --
>> Robb Kerr
Yes, see what the vars are, maybe something like this:
if ($vBkgrndImage == "AnswerPage") {
echo "1: $vAnswerID_RS_PageContent<br>";
echo "2:".$row_RS_PageContent['CorrectAnswer']."<br>";
}
Then look on your page for the numbers 1 and 2 and see if the vars are
what you're expecting.
--
--Matthew Sims
--<http://killermookie.org>