0 Replies Latest reply on Feb 13, 2011 12:38 PM by pabirds

    Tooltip link to PHP/MYSQL Database

    pabirds

       

      I have several Tooltips on a page linked to a PHP/MYSQL database.

       

      I want to enter a parameter value for each tooltip to bring up separate data. Ie. For tooltip1, I want the RouteNumber to be 2 so it brings up the data for that route, for Tooltip2, I want the RouteNumber to be 5, etc.

       

      I can’t figure out the proper coding to send a value to the database for each tooltip.

       

      Here is the tooltip code:

       

      <div class="tooltipContent" id="sprytooltip1">

      <p>Route#: <?php echo $row_WRSRoute['RouteNumber']; ?><br>

      Route Name:<?php echo $row_WRSRoute['ShortDescription']; ?><br>

      Compiler: <?php echo $row_WRSRoute['Compiler']; ?><br>

      </p>

      </div>

      <div class="tooltipContent" id="sprytooltip2">

      <p>Route#: <?php echo $row_WRSRoute['RouteNumber']; ?><br>

      Route Name:<?php echo $row_WRSRoute['ShortDescription']; ?><br>

      Compiler: <?php echo $row_WRSRoute['Compiler']; ?><br>

      </p>

      </div>

       

      The Recordset is set to:

      SELECT *

      FROM wrsroutes

      WHERE RouteNumber = colname

       

      If I set the Recordset to Value = 2 (instead of colname), the data displays in the tooltip (for RouteNumber 2), so I have all of the connections, etc. set properly. I just can't figure out how to send a different parameter for each tooltip.

       

      So, how do I pass the RouteNumber to the database for each tooltip?

       

      I assume it is a fairly simple string, but I cannot find any help on this topic.