par
davidc » 04 sept. 2005, 21:36
Dans ce cas, le lien correspondant me donne
www.monurl/mix/.mp3
Il manque le nom du fichier...
L'exemple ici:
http://www.samidee.com/radioshow.php
Je joins mon code au cas ou...
<?php include('connection.inc.php'); ?>
<?php
// Connexion à la base
$conn=mysql_connect($host,$user,$password) or die("Impossible de se connecter au serveur MySQL");
$bd=mysql_select_db($bdd,$conn) or die("Impossible de se connecter à la base de données");
$idMix = (isset($_GET['idMix']))?$_GET['idMix']:null;
// Requete 1
$req= "SELECT id, num_show FROM radioshow";
$exec = mysql_query($req);
// Requete 2
$req2= "SELECT baseline FROM radioshow WHERE id=".$idMix;
$exec2 = mysql_query($req2);
// Requete 3
$req3= "SELECT part1 FROM radioshow WHERE id=".$idMix;
$exec3 = mysql_query($req3);
// Requete 4
$req4= "SELECT link1 FROM radioshow WHERE id=".$idMix;
$exec4 = mysql_query($req4);
// Requete 5
$req5= "SELECT part2 FROM radioshow WHERE id=".$idMix;
$exec5 = mysql_query($req5);
// Requete 6
$req6= "SELECT part2 FROM radioshow WHERE id=".$idMix;
$exec6 = mysql_query($req6);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sami Dee, le site officiel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFFFFF;
}
a {
font-size: 12px;
color: #FFFFFF;
}
a:visited {
color: #FCD300;
text-decoration: none;
}
a:hover {
color: #FCD300;
text-decoration: none;
}
a:active {
color: #FCD300;
text-decoration: none;
}
a:link {
text-decoration: none;
}
.Style1 {
font-size: 11px;
font-weight: bold;
}
body {
background-color: #FFFFCC;
}
.Style2 {
color: #FDD303;
font-weight: bold;
}
.Style3 {
color: #FCD300;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="740" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="000000" >
<tr>
<td><table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="740" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/hautgauche.jpg" width="330" height="150"></td>
<td><a href="index.php"><img src="img/hautdroite.jpg" width="410" height="150" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><? include "menu.php" ?></td>
</tr>
<tr>
<td height="420" background="img/background-radioshow.jpg" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="55" colspan="6"> </td>
</tr>
<tr>
<td width="26" height="306"> </td>
<td width="391" height="306" align="left" valign="top">
<table width="100%" border="0">
<tr>
<td>
<span class="Style2">
<?php
while($radioshow = mysql_fetch_assoc($exec2))
{
echo $radioshow['baseline'];
}
?>
</span>
<div align="justify"></div></td>
</tr>
<tr>
<td height="4"><div align="justify"><br>
<br>
</div></td>
</tr>
<tr>
<td>
<span class="Style2">PART. ONE</span><br> <?php
while($radioshow = mysql_fetch_assoc($exec3))
{
echo $radioshow['part1'];
}
?>
<div align="justify"></div></td>
</tr>
<tr>
<td><div align="justify"></div></td>
</tr>
<tr>
<td align="right">
<?php
while($radioshow = mysql_fetch_assoc($exec4))
{
echo $radioshow['link1'];
}
?>
<div align="justify"></div></td>
</tr>
<tr>
<td>
<span class="Style3">PART 2.</span><br> <?php
while($radioshow = mysql_fetch_assoc($exec5))
{
echo $radioshow['part2'];
}
?>
<div align="justify"></div></td>
</tr>
<tr>
<td><div align="justify"></div></td>
</tr>
<tr>
<td align="right">
<?php
while($radioshow = mysql_fetch_assoc($exec6))
{
echo '<a href="mix/'.$radioshow['link2'].'.mp3">Telecharger le fichier</a>';
}
?>
<div align="justify"></div></td>
</tr>
</table>
<div align="left"></div></td>
<td width="84" height="306" valign="top"><div align="center">
<br>
<br>
<?php
// Requête 1 et récupération du lien
while($radioshow = mysql_fetch_assoc($exec))
{
echo '<a href="'.$_SERVER['PHP_SELF'].'?idMix='.$radioshow['id'].'">'.$radioshow['num_show'].'</a><br/>';
}
?>
</div></td>
<td width="39" height="306"></td>
<td width="178" height="306"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="215"></td>
</tr>
<tr>
<td align="center" valign="top"><div align="center"><span class="Style1"><a href="/mix/253-1.mp3" target="_blank"><br>
SEPTEMBRE 05<br>
AOUT 05 Part.1</a></span><br>
<span class="Style1"><a href="/mix/253-2.mp3" target="_blank">AOUT 05 Part 2.</a></span> </div></td>
</tr>
</table></td>
<td height="306"></td>
</tr>
<tr>
<td height="59" colspan="6"></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<tr>
<td><img src="img/footer2-on.jpg" width="740"></td>
</tr>
<tr>
<td><img src="img/footer3.jpg" width="740" height="7"></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<map name="Lien S.MediasMap">
<area shape="rect" coords="685,3,731,18" href="#">
</map>
</body>
</html>
Dans ce cas, le lien correspondant me donne www.monurl/mix/.mp3
Il manque le nom du fichier... :roll:
L'exemple ici: [url]http://www.samidee.com/radioshow.php[/url]
Je joins mon code au cas ou...
[php]
<?php include('connection.inc.php'); ?>
<?php
// Connexion à la base
$conn=mysql_connect($host,$user,$password) or die("Impossible de se connecter au serveur MySQL");
$bd=mysql_select_db($bdd,$conn) or die("Impossible de se connecter à la base de données");
$idMix = (isset($_GET['idMix']))?$_GET['idMix']:null;
// Requete 1
$req= "SELECT id, num_show FROM radioshow";
$exec = mysql_query($req);
// Requete 2
$req2= "SELECT baseline FROM radioshow WHERE id=".$idMix;
$exec2 = mysql_query($req2);
// Requete 3
$req3= "SELECT part1 FROM radioshow WHERE id=".$idMix;
$exec3 = mysql_query($req3);
// Requete 4
$req4= "SELECT link1 FROM radioshow WHERE id=".$idMix;
$exec4 = mysql_query($req4);
// Requete 5
$req5= "SELECT part2 FROM radioshow WHERE id=".$idMix;
$exec5 = mysql_query($req5);
// Requete 6
$req6= "SELECT part2 FROM radioshow WHERE id=".$idMix;
$exec6 = mysql_query($req6);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sami Dee, le site officiel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFFFFF;
}
a {
font-size: 12px;
color: #FFFFFF;
}
a:visited {
color: #FCD300;
text-decoration: none;
}
a:hover {
color: #FCD300;
text-decoration: none;
}
a:active {
color: #FCD300;
text-decoration: none;
}
a:link {
text-decoration: none;
}
.Style1 {
font-size: 11px;
font-weight: bold;
}
body {
background-color: #FFFFCC;
}
.Style2 {
color: #FDD303;
font-weight: bold;
}
.Style3 {
color: #FCD300;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="740" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="000000" >
<tr>
<td><table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="740" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/hautgauche.jpg" width="330" height="150"></td>
<td><a href="index.php"><img src="img/hautdroite.jpg" width="410" height="150" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><? include "menu.php" ?></td>
</tr>
<tr>
<td height="420" background="img/background-radioshow.jpg" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="55" colspan="6"> </td>
</tr>
<tr>
<td width="26" height="306"> </td>
<td width="391" height="306" align="left" valign="top">
<table width="100%" border="0">
<tr>
<td>
<span class="Style2">
<?php
while($radioshow = mysql_fetch_assoc($exec2))
{
echo $radioshow['baseline'];
}
?>
</span>
<div align="justify"></div></td>
</tr>
<tr>
<td height="4"><div align="justify"><br>
<br>
</div></td>
</tr>
<tr>
<td>
<span class="Style2">PART. ONE</span><br> <?php
while($radioshow = mysql_fetch_assoc($exec3))
{
echo $radioshow['part1'];
}
?>
<div align="justify"></div></td>
</tr>
<tr>
<td><div align="justify"></div></td>
</tr>
<tr>
<td align="right">
<?php
while($radioshow = mysql_fetch_assoc($exec4))
{
echo $radioshow['link1'];
}
?>
<div align="justify"></div></td>
</tr>
<tr>
<td>
<span class="Style3">PART 2.</span><br> <?php
while($radioshow = mysql_fetch_assoc($exec5))
{
echo $radioshow['part2'];
}
?>
<div align="justify"></div></td>
</tr>
<tr>
<td><div align="justify"></div></td>
</tr>
<tr>
<td align="right">
<?php
while($radioshow = mysql_fetch_assoc($exec6))
{
echo '<a href="mix/'.$radioshow['link2'].'.mp3">Telecharger le fichier</a>';
}
?>
<div align="justify"></div></td>
</tr>
</table>
<div align="left"></div></td>
<td width="84" height="306" valign="top"><div align="center">
<br>
<br>
<?php
// Requête 1 et récupération du lien
while($radioshow = mysql_fetch_assoc($exec))
{
echo '<a href="'.$_SERVER['PHP_SELF'].'?idMix='.$radioshow['id'].'">'.$radioshow['num_show'].'</a><br/>';
}
?>
</div></td>
<td width="39" height="306"></td>
<td width="178" height="306"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="215"></td>
</tr>
<tr>
<td align="center" valign="top"><div align="center"><span class="Style1"><a href="/mix/253-1.mp3" target="_blank"><br>
SEPTEMBRE 05<br>
AOUT 05 Part.1</a></span><br>
<span class="Style1"><a href="/mix/253-2.mp3" target="_blank">AOUT 05 Part 2.</a></span> </div></td>
</tr>
</table></td>
<td height="306"></td>
</tr>
<tr>
<td height="59" colspan="6"></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<tr>
<td><img src="img/footer2-on.jpg" width="740"></td>
</tr>
<tr>
<td><img src="img/footer3.jpg" width="740" height="7"></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<map name="Lien S.MediasMap">
<area shape="rect" coords="685,3,731,18" href="#">
</map>
</body>
</html>
[/php]