Jump to content

vikingbear_ds

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by vikingbear_ds

  1. Solved it, (and looking back it makes sense) Thanks for everybody's time and input! <?php if ($totalRows_rsOsprey['tour_header_08'] > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_08']; ?></a></li> <?php } // Show if recordset not empty ?>
  2. Hi Gury, I should also have explained that I am a coding novice.. I tried <?php echo $row_rsOsprey['tour_header_08']; var_dump($tour_header_08); ?> and got an error in the browser ; PHP Notice: Undefined variable: tour_header_08 in C:\inetpub\wwwroot\2013.downunderdive.com.au\osprey_v_cruise.php on line 609
  3. Hi Gury.. http://2013.downunderdive.com.au/osprey_v_cruise.php You can see the last TAB is still showing althought there is no data fed from database..
  4. Hi Guru, I should probably mention that the <li> is part of a JQUERY tab system, I tried to 'hide' one of the <div> statements as well.. What do you mean by 'What is $totalRows_rsOsprey set to?' are you thinking field type in database? <ul> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_02']; ?></a></li> <?php } // Show if recordset not empty ?> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_03']; ?></a></li> <?php } // Show if recordset not empty ?> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_04']; ?></a></li> <?php } // Show if recordset not empty ?> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_05']; ?></a></li> <?php } // Show if recordset not empty ?> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_06']; ?></a></li> <?php } // Show if recordset not empty ?> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_07']; ?></a></li> <?php } // Show if recordset not empty ?> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_08']; ?></a></li> <?php } // Show if recordset not empty ?> </ul> <div> <div><?php echo $row_rsOsprey['tour_text_02']; ?></div> <div><?php echo $row_rsOsprey['tour_text_03']; ?></div> <div><?php echo $row_rsOsprey['tour_text_04']; ?></div> <div><?php echo $row_rsOsprey['tour_text_05']; ?></div> <div><?php echo $row_rsOsprey['tour_text_06']; ?></div> <div><?php echo $row_rsOsprey['tour_text_07']; ?></div> <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <div><?php echo $row_rsOsprey['tour_text_08']; ?></div> <?php } // Show if recordset not empty ?> </div>
  5. Hi, using php and mySQL I am trying to hide items in a list if the field is empty in the database, this function has worked in teh past, but in this case the <li> is still displaying on the page.. <?php if ($totalRows_rsOsprey > 0) { // Show if recordset not empty ?> <li><a><?php echo $row_rsOsprey['tour_header_08']; ?></a></li> <?php } // Show if recordset not empty ?> ANy suggestions? Regards, Ken
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.