If equals or

got a cell in a table that will either have no content, a value of required or a name.

i need either a number 4 to show if the cell has a name, or if the cell has either no content or the value of required to show a 5

below is what i have. the 5 and 4 are showing either if the cell has required, no content or a name.

<?php if ($row_Recordset1 ['GuName'] == ' ' || $row_Recordset1 ['GuName'] == 'required'):?>
<?php endif;?> <?php if ($row_Recordset1 ['GuName'] != ' ' or $row_Recordset1 ['GuName'] != 'required'):?>
<?php endif;?>

thanks in advance

So what have your tried? At least you could make a comment block that shows all possibilities.

I have tried

<?php if ($row_Recordset1 ['GuName'] == ' ' || $row_Recordset1 ['GuName'] == 'required'):?>5 <?php endif;?> <?php if ($row_Recordset1 ['GuName'] != ' ' || $row_Recordset1 ['GuName'] != 'required'):?>4<?php endif;?>


<?php if ($row_Recordset1 ['GuName'] == ' ' or $row_Recordset1 ['GuName'] == 'required'):?>5 <?php endif;?> <?php if ($row_Recordset1 ['GuName'] != ' ' or $row_Recordset1 ['GuName'] != 'required'):?>4<?php endif;?>


<?php if (($row_Recordset1 ['GuName'] == ' ') || ($row_Recordset1 ['GuName'] == 'required')):?>5 <?php endif;?> <?php if (($row_Recordset1 ['GuName'] != ' ') || ($row_Recordset1 ['GuName'] != 'required')):?>4<?php endif;?>


And what was the problem with each? What is the test data? What about the comment?

whatever i test they are just returning 5 4

i’m out as you are not willing to answer relevant questions.

Sorry I am not sure what questions you are asking

Sponsor our Newsletter | Privacy Policy | Terms of Service