Hello,
I'm doing a website about a music school, in this moment i'm working the list of instruments:
<?php
$username = "root";
$password = "";
$hostname = "localhost";
$database = "esola_musica";
$connect = mysql_connect($hostname, $username, $password) or die("Erro na ligação à BD.");
mysql_select_db($database,$connect) or die(mysql_error());
$sql_imagem = "SELECT cod_curso, image_curso, nome_curso FROM curso ORDER BY nome_curso ASC";
$i=0;
echo "<table width = 90% height = 45% align = center>";
$executa=mysql_query($sql_imagem,$connect);
while($dados=mysql_fetch_array($executa))
{
$i+=1;
if ($i == 1)
{
echo "<tr> <td align = center>";
}
else {
echo "<td align = center>";
}
echo "<a href='curso_guitarra.php'>";
echo "<img src=\"".$dados['image_curso']."\"/> <br /> ".$dados['nome_curso'];
echo "</a>";
if ($i == 4) {
echo "</td> </tr>";
$i=0;
}
else {
echo "</td>";
}
}
echo "</table>";
?>
what i want is to link the images to their respective study plan. Like, if i click on electric guitar it opens its study plan*.
*STUDY PLAN is what the students will learn in the instrument lessons