php Tableau selon lien
Posté : 15 mars 2012, 23:12
Bonjour,
comment est il possible d'afficher un tableau plutôt qu'un autre en fonction d'une partie d'un lien? (partie rouge)
http://localhost/liste/index.php?id=CC01
Je n'arrive qu'à faire afficher le tableau else
Merci d'avance pour votre aide
comment est il possible d'afficher un tableau plutôt qu'un autre en fonction d'une partie d'un lien? (partie rouge)
http://localhost/liste/index.php?id=CC01
Je n'arrive qu'à faire afficher le tableau else
Merci d'avance pour votre aide
<?php
if (!empty($_GET['CC01']))
{
$CC01 = "<table border='0' align='center' width='100' height='175'><TR>";
$CC01 .= "<TD align='center'><a href='20g316/img_CC01_01.jpg' target=_blank><img src='20m317/img_CC01_01.jpg' width='100' height='100' border='3'></a><br><input type='radio' name='radiobutton1' value='img_CC01_01.jpg' checked='checked'></TD>";
$CC01 .= "<TD align='center'><a href='20g316/img_CC01_02.jpg' target=_blank><img src='20m317/img_CC01_02.jpg' width='100' height='100' border='3'></a><br><input type='radio' name='radiobutton1' value='img_CC01_02.jpg'></TD>";
$CC01 .= "<TD align='center'><a href='20g316/img_CC01_03.jpg' target=_blank><img src='20m317/img_CC01_03.jpg' width='100' height='100' border='3'></a><br><input type='radio' name='radiobutton1' value='img_CC01_03.jpg'></TD>";
$CC01 .= "</tr></table>";
echo $CC01;
}
if (!empty($_GET['CC02']))
{
$CC02 = "<table border='0' align='center' width='100' height='175'><TR>";
$CC02 .= "<TD align='center'><a href='20g316/img_CC02_01.jpg' target=_blank><img src='20m317/img_CC02_01.jpg' width='100' height='100' border='3'></a><br><input type='radio' name='radiobutton1' value='img_CC02_01.jpg' checked='checked'></TD>";
$CC02 .= "<TD align='center'><a href='20g316/img_CC02_02.jpg' target=_blank><img src='20m317/img_CC02_02.jpg' width='100' height='100' border='3'></a><br><input type='radio' name='radiobutton1' value='img_CC02_02.jpg'></TD>";
$CC02 .= "<TD align='center'><a href='20g316/img_CC02_03.jpg' target=_blank><img src='20m317/img_CC02_03.jpg' width='100' height='100' border='3'></a><br><input type='radio' name='radiobutton1' value='img_CC02_03.jpg'></TD>";
$CC02 .= "</tr></table>";
echo $CC02;
}
else
{
$tableau2 = "<table border='0' align='center' width='70%' height='100'><tr><td>";
$tableau2 .= "<p class='titre'>Choisissez à droite le thème de votre image";
$tableau2 .= "</tr></tr></table>";
echo ($tableau2);
}
?>