Eléphanteau du PHP |
16 Messages
29 mai 2012, 10:15
Bonjour, je ne comprends pas, cette page n'envoie pas de tableau, c'est celle qui doit justement recevoir les valeurs du tableau.
Je vous fournis le code de la page précédente pour être peut-être plus précis.
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function popup(page) {
// ouvre une fenetre sans barre d'etat, ni d'ascenceur
window.open(page,'popup','width=410,height=280,toolbar=false,scrollbars=false');
}
</SCRIPT>
<title>Structure & équipes pédagogiques</title></HEAD>
<style type="text/css">
<?php /** Création de différents styles propres à la page PHP. */?>
<!--
.Style1 {
color: #000000;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.Style2 {
color: #FFCC00;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.Style4 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #0099FF;
}
a:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: medium;
font-style: oblique;
color: #0099FF;
}
a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: medium;
font-style: oblique;
color: #0099FF;
}
-->
</style>
<h1 align="center" class="Style4">STRUCTURE ET EQUIPES PEDAGOGIQUES </h1><BR><BR>
<table width='700' border='0' align='center'>
<tr valign="top">
<td><div align='center'>
<?php
/**Connexion à la base de données*/
require_once('connection_bdd.php');
$id_connect = mysql_connect(SERVEUR,LOG,MDP) or die ("probleme de connexion");
mysql_select_db(BDD) or die ("probleme de BDD");
mysql_query("SET NAMES 'utf8'");
/** Requête SQL*/
$sql=" select * from cycle ";
$req = mysql_query($sql) or die("Erreur SQL !<br>$sql<br>mysql_error()");
while($field = mysql_fetch_array($req))
{
echo "<table border='0' width='341' cellspacing='0' cellpadding='0' align='center'>
<td width='10' valign='top'><img border='0' src='CLT.gif' width='10' height='10'></td>
<td colspan='2' valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
<td width='10' valign='top'><img border='0' src='CRT.gif' width='10' height='10'></td>
</tr>
<tr>
<td bgcolor='#DFE3EB' valign='top'><img border='0' src='1px.gif' width='10' height='10'></td>
<td width='51' bgcolor='#DFE3EB' valign='top'>
<p><a href='javascript:popup(\"info_pop.php?id_cycle=$field[0]\")'><img src='info.gif' width='51' height='51' border='0' alt='Information sur le $field[2]'></a><br>
</p>
</td>
<td width='266' bgcolor='#DFE3EB' valign='center'><div align='center' class='Style1'>
<h3>$field[1]</h3>
</div></td>
<td bgcolor='#DFE3EB' valign='top'><img border='0' src='1px.gif' width='10' height='10'></td>
</tr>
<tr>
<td height='10' valign='top'><img border='0' src='CLD.gif' width='10' height='10'></td>
<td colspan='2' valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
<td valign='top'><img border='0' src='CRD.gif' width='10' height='10'></td>
</tr>
</table>";
echo "<table border='0' width='273' cellspacing='0' cellpadding='0' align='center'><tr>";
$sql2=" select * from ass_cycle_annee where id_cycle = $field[0] ";
$req2 = mysql_query($sql2) or die("Erreur SQL !<br>$sql2<br>mysql_error()");
while($field2 = mysql_fetch_array($req2))
{
echo "<td><table border='0' width='50' cellspacing='0' cellpadding='0' align='center'>
<tr>
<td colspan='3' valign='top'><div align='center'><img src='bas.gif' width='15' height='17'></div></td>
</tr>
<tr>
<td width='10' valign='top'><img border='0' src='CLT.gif' width='10' height='10'></td>
<td width='249' valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
<td width='10' valign='top'><img border='0' src='CRT.gif' width='10' height='10'></td>
</tr>
<tr>
<td valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
<td valign='top' bgcolor='#DFE3EB'><p align='center'><a href='index2.php?id_niveau=$field2[2]' class='Style3'> $field2[2] °</a></p> </td>
<td valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
</tr>
<tr>
<td height='10' valign='top'><img border='0' src='CLD.gif' width='10' height='10'></td>
<td valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
<td valign='top'><img border='0' src='CRD.gif' width='10' height='10'></td>
</tr>
</table></td>";
}
echo "</tr></table><br><br>";
}
require ("pied.php");
?></div></td>
<td><div align='center'>
<?php
$sql3=" select * from matiere ORDER BY nom_matiere ";
$req3 = mysql_query($sql3) or die("Erreur SQL !<br>$sql3<br>mysql_error()");
while($field3 = mysql_fetch_array($req3))
{
echo "<table border='0' width='163' cellspacing='0' cellpadding='0' align='center'>
<tr>
<td width='10' valign='top'><img border='0' src='CLT.gif' width='10' height='10'></td>
<td width='143' valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
<td width='10' valign='top'><img border='0' src='CRT.gif' width='10' height='10'></td>
</tr>
<tr>
<td bgcolor='#DFE3EB' valign='top'><img border='0' src='1px.gif' width='10' height='10'></td>
<td valign='top' bgcolor='#DFE3EB'>
<p align='center'><a href='index3.php?id_matiere=$field3[0]'>$field3[1]</a></p> </td>
<td bgcolor='#DFE3EB' valign='top'><img border='0' src='1px.gif' width='10' height='10'></td>
</tr>
<tr>
<td height='10' valign='top'><img border='0' src='CLD.gif' width='10' height='10'></td>
<td valign='top' bgcolor='#DFE3EB'><img border='0' src='1px.gif' width='10' height='10'></td>
<td valign='top'><img border='0' src='CRD.gif' width='10' height='10'></td>
</tr>
<tr>
<td height='10' colspan='3' valign='top'><div align='center'><img src='bas.gif' width='15' height='17'></div></td>
</tr>
</table>";
}
?></div></td>
</tr>
</table>
<?php
require ("pied.php");
?>
Ce que je ne comprend pas c'est que le site marchait très bien avant le passage en PHP 5...
Merci d'avance