Skip navigation
Currently Being Moderated

Tooltip link to PHP/MYSQL Database

Feb 13, 2011 12:38 PM

 

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.

 

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points