I've got a php front-end table on my website. You can see the "test page" here:
http://www.ascentfx.com/en/red.html
I want the buttons to point to their respective URLS. For example the "CPFX" button should point to
http://www.ascentfx.com/en/cpfx.html
I can't do this in the usual HTML way. So somehow I need to get the URL into the php code, which I've put in bold below.
I assume there's some sort of echo code to grab the specific table row's name, but I'm not a coder and I'm also OLD and not as sharp as I was in my youth!
Thanks much!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<script language ="javascript">
function vmail()
{
m= document.programs.T2.value;
if ((m.indexOf('@')==-1)||(m.indexOf('.')==-1)||(m.length<5)){
alert ('Please enter a correct e-mail!');
document.programs.T2.value='';
document.programs.T2.focus();
}
}
function verif()
{
if ((document.programs.T10.value=="")||(document.programs.T2.value=="")||(document.programs.T5.value=="")) {alert ("Please fill all required fields");
document.programs.T10.focus();
return false; }
return true;
}
</script>
</head>
<?php
if (isset($_POST['T10'])) {
include('components/com_ckforms/views/ckformsdata/tmpl/affichage.php');
}
else
{
?>
<p><br></p>
<style>
.hide label{display:none;}
.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: #FFFFFF;
padding: 5px;
left: -1000px;
border: 0px SOLID #000088;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: -100px;
left: 150px; /*position where enlarged image should offset horizontally */
}
</style>
<style type="text/css" mce_bogus="1"></style>
<div height=100%>
<p> </p>
<table style="text-align: center; width: 99%;" align="center" border="1" cellpadding="5" cellspacing="0">
<tbody><!--Start 1st tr-->
<tr style="text-align: center; background-color: rgb(173, 216, 230);" mce_style="text-align: center; background-color: #add8e6;" background="" valign="center" height="100" lang="">
<td width="13%" style="text-align: center; background-color: rgb(173, 216, 230);" scope="" lang="" mce_style="text-align: center; background-color: #add8e6;">
<p><span style="font-family: arial,helvetica,sans-serif;" mce_style="font-family: arial,helvetica,sans-serif;">Program</span></p></td>
<td width="54%" style="text-align: center; background-color: rgb(173, 216, 230);" scope="" lang="" mce_style="text-align: center; background-color: #add8e6;">
<p><span style="font-family: arial,helvetica,sans-serif;" mce_style="font-family: arial,helvetica,sans-serif;">Graph (roll mouse over for larger image)</span></p></td>
<td width="15%" style="text-align: center; background-color: rgb(173, 216, 230);" scope="" lang="" mce_style="text-align: center; background-color: #add8e6;">
<p><span style="font-family: arial,helvetica,sans-serif;" mce_style="font-family: arial,helvetica,sans-serif;">Minimum Investment</span></p></td>
<td width="18%" style="text-align: center; background-color: rgb(173, 216, 230);" scope="" lang="" mce_style="text-align: center; background-color: #add8e6;"><span style="font-family: arial, helvetica, sans-serif">Program Details</span></td>
</tr><!--Start 2nd tr-->
<?php
$i=0;
@ include ('DBconnect.php');
$sql= ("select * from program group by program");
$req= mysql_query($sql);
while ($data= mysql_fetch_array($req)) {
$nom= $data['program'];
$sql2= ("select * from program where (year= 2010)and(program= '$nom')");
$req2= mysql_query($sql2);
while ($val= mysql_fetch_array($req2)) {
$avg= $val['avgmonth'];
}
$sql2= ("select * from program where (year= 2009) and(program= '$nom')");
$req2= mysql_query($sql2);
while ($val= mysql_fetch_array($req2)) {
$return = $val['total'];
}
$i++;
?>
<tr <?php if ($i%2==1){ echo("class=even" ) ; } ?> >
<td lang="">
<p><?php echo $data['program']; ?></p></td>
<td><a class="thumbnail" mce_href="#"><img src="components/com_ckforms/views/ckformsdata/tmpl/display.php?D1=<?php echo $data['program']; ?>" mce_src="components/com_ckforms/views/ckformsdata/tmpl/display.php?D1=<?php echo $data['program']; ?>" width="124" height="75"><span> <img src="components/com_ckforms/views/ckformsdata/tmpl/display.php?D1=<?php echo $data['program']; ?>" mce_src="components/com_ckforms/views/ckformsdata/tmpl/display.php?D1=<?php echo $data['program']; ?>" ></span></a><br mce_bogus="1"></td>
<td>
<p><?php echo $data['mininvest']; ?></td>
<td>
[U][B]<img src="components/com_ckforms/views/button.png">[/B][/U]</td>
</tr>
<?php
}
?>
<!--Start 3rd tr-->
<!--Start 4th tr-->
<!--Start 5th tr-->
<!--Start 6th tr-->
<!--Start 7th tr-->
<!--Start 8th tr-->
<!--Start 9th Row-->
<!--Start 10th Row-->
<!--Start 11th Row-->
<!--Start 12th Row-->
</tbody></table>
<br>
</div>
<p style="text-align: left;" mce_style="TEXT-ALIGN: left"> </p>
<?php
}
?>