views:

30

answers:

1
    $result=mysqli_fetch_array(mysqli_query($link, $query)); the IF MAYOR image is not working i guess there is a confilct with the original db call?

In addition to email reminders, you can also LEND WITH CONFIDENCE because I have have a VERIFIED ACCOUNT and neigh*borrow will GUARANTEE that I return this item or they will replace it up to $50."; } } ?>

this code tells the page whether or not to display some text... i want to display an alternate image to THIS ONE IF THE CONDITION IS MET... borrowing power =mayor

<div style="position:absolute;top:160px;left:535px;"><img src="images/NEI_icon_color.jpg"></div>
A: 

first detect the condition at the top of the script:

<?php
  $isMayor = false;
  ...
  if ($row['borrowingPower'] == 'mayor') {
    $isMayor = true;
  }
  ...
?>

then emit different html based on $isMayor:

<?php if ($isMayor) { ?>
  <div id="a">mayor</div>
<?php } else { ?>
  <div id="b">non-mayor</div>
<?php } ?>

...

<?php if ($isMayor) { ?>
  hey mayor
<?php } ?>
jspcal
so the top code could go anywhere on the page then the bottom code is where i could direct to two different images?
adam
yeah, the top code should be at some place where it will always run before the other parts, usually at the very top
jspcal
Parse error: syntax error, unexpected '.' in /home/neighborrow/www.neighborrow.com/wanted_test.php on line 326http://neighborrow.com/wanted_test.php?item=146#
adam
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/neighborrow/www.neighborrow.com/wanted_test.php on line 7
adam