This topic is locked

Problem with the code of a link

7/26/2012 4:48:34 AM
PHPRunner General questions
W
wundebar author

Hi to every body.

I have also another problem.. in a table i have a field that is a link where i upload documents. In events "after record processed" i wrote this code



if ($data['report']!="")

{

$record ["report_style"]='style="font-weight:bold;color:blue"';

}

so in this way if the field is full the link become blue.
Now i have added into the database another field, and i want that also in this case the link become blu if there is a file uploaded, so i have just added the same code after the code above so it looks like



if ($data['report']!="")

{

$record ["report_style"]='style="font-weight:bold;color:blue"';

}

elseif ($data['verbale-sopralluogo']!="")

{

$record ["verbale-sopralluogo_style"]='style="font-weight:bold;color:blue"';

}



but i donno why it don't works! The record "verbale-sopralluogo" don't become blu... why? I thought was a problem of "color" so i've also changed "blue" with "red" but the problem remains..

What is wrong? Thanks for help.

Regards.

W
wundebar author 7/31/2012



Hi to every body.

I have also another problem.. in a table i have a field that is a link where i upload documents. In events "after record processed" i wrote this code



if ($data['report']!="")

{

$record ["report_style"]='style="font-weight:bold;color:blue"';

}

so in this way if the field is full the link become blue.
Now i have added into the database another field, and i want that also in this case the link become blu if there is a file uploaded, so i have just added the same code after the code above so it looks like



if ($data['report']!="")

{

$record ["report_style"]='style="font-weight:bold;color:blue"';

}

elseif ($data['verbale-sopralluogo']!="")

{

$record ["verbale-sopralluogo_style"]='style="font-weight:bold;color:blue"';

}



but i donno why it don't works! The record "verbale-sopralluogo" don't become blu... why? I thought was a problem of "color" so i've also changed "blue" with "red" but the problem remains..

What is wrong? Thanks for help.

Regards.


I would like to know why happen this?

Maybe i done too much "build" and it is not good for the program?

Thanks.

C
cgphp 7/31/2012

Try to remove the elseif:

if($data['report']!="")

{

$record["report_style"] = 'style="font-weight:bold;color:blue"';

}
if($data['verbale-sopralluogo']!="")

{

$record["verbale-sopralluogo_style"] = 'style="font-weight:bold;color:blue"';

}
W
wundebar author 7/31/2012



Try to remove the elseif:

if($data['report']!="")

{

$record["report_style"] = 'style="font-weight:bold;color:blue"';

}
if($data['verbale-sopralluogo']!="")

{

$record["verbale-sopralluogo_style"] = 'style="font-weight:bold;color:blue"';

}



Hi Cristian,

I've already tried it, but the problem remains.. i'm going crazy. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=67217&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />