Pb php...
bah.s
Messages postés
28
Date d'inscription
Statut
Membre
Dernière intervention
-
Nettogrof Messages postés 521 Date d'inscription Statut Membre Dernière intervention -
Nettogrof Messages postés 521 Date d'inscription Statut Membre Dernière intervention -
Bonjour j'ai l'erreur suivante:
Parse error: parse error, unexpected T_STRING in c:\dess\societe\consoffre.php on line 51
des que je rafraichis(F5) la page l'erreur disparait, normalement le message veux dire qu'un ";" manque???
voila le code source:
<?
session_start();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header('pragma:no-cache');
header("Cache-Control: no-cache, must-revalidate");
$id_societe=$_SESSION[id];
function connexion(){
mysql_connect('localhost','','') or die("erreur de connexion au serveur");
mysql_select_db('dess') or die("erreur de connexion a la base de donnees");
}
function deconnexion(){
mysql_close();
}
function debut_table(){
print("<table class=\"aTable\" width=\"90%\" align=\"center\" border=\"3\">");
}
function fin_table(){
echo "</table>";
}
function affiche($requete){
echo "<table class=\"aTable\" width=\"90%\" align=\"center\" border=\"3\">";
echo "<tr>";
echo "<td class=\"intitule1\" align=\"center\">Titre</td>";
echo "<td class=\"intitule1\" align=\"center\">Détail</td>";
echo "<td class=\"intitule1\" align=\"center\">Date du dépot</td>";
echo "<td class=\"intitule1\" align=\"center\">Durée</td>";
echo "<td class=\"intitule1\" align=\"center\">Date début</td>";
echo "<td class=\"intitule1\" align=\"center\">Supprimer</td>";
echo "</tr>";
$res=mysql_query($requete);
while ($row=mysql_fetch_row($res)){
echo "<tr>";
echo "<td class=\"intitule\" align=center> $row[1] </td>";
echo "<td class=\"intitule\" align=center> $row[2] </td>";
echo "<td class=\"intitule\" align=center> $row[3] </td>";
echo "<td class=\"intitule\" align=center> $row[4] </td>";
echo "<td class=\"intitule\" align=center> $row[5] </td>";
echo "<td class=\"intitule\" align=center> <a href=\"consOffre.php?id_s=$row[0]\">supprimer</a> </td>";
echo "</tr> ";
}
mysql_free_result($res);
echo "</table>";
}
if(isset($id_s)){
connexion();
mysql_query("delete from offre_stage where id=$id_s");
deconnexion();
}
connexion();
$resultat=mysql_query("select nom from societe where id=$id_societe");
$row=mysql_fetch_row($resultat);
$nom=$row[0];
print("Offre de stage de la societe $nom :<br> <br>");
connexion();
affiche("select * from offre_stage where id_societe=$id_societe");
deconnexion();
?>
merci
Parse error: parse error, unexpected T_STRING in c:\dess\societe\consoffre.php on line 51
des que je rafraichis(F5) la page l'erreur disparait, normalement le message veux dire qu'un ";" manque???
voila le code source:
<?
session_start();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header('pragma:no-cache');
header("Cache-Control: no-cache, must-revalidate");
$id_societe=$_SESSION[id];
function connexion(){
mysql_connect('localhost','','') or die("erreur de connexion au serveur");
mysql_select_db('dess') or die("erreur de connexion a la base de donnees");
}
function deconnexion(){
mysql_close();
}
function debut_table(){
print("<table class=\"aTable\" width=\"90%\" align=\"center\" border=\"3\">");
}
function fin_table(){
echo "</table>";
}
function affiche($requete){
echo "<table class=\"aTable\" width=\"90%\" align=\"center\" border=\"3\">";
echo "<tr>";
echo "<td class=\"intitule1\" align=\"center\">Titre</td>";
echo "<td class=\"intitule1\" align=\"center\">Détail</td>";
echo "<td class=\"intitule1\" align=\"center\">Date du dépot</td>";
echo "<td class=\"intitule1\" align=\"center\">Durée</td>";
echo "<td class=\"intitule1\" align=\"center\">Date début</td>";
echo "<td class=\"intitule1\" align=\"center\">Supprimer</td>";
echo "</tr>";
$res=mysql_query($requete);
while ($row=mysql_fetch_row($res)){
echo "<tr>";
echo "<td class=\"intitule\" align=center> $row[1] </td>";
echo "<td class=\"intitule\" align=center> $row[2] </td>";
echo "<td class=\"intitule\" align=center> $row[3] </td>";
echo "<td class=\"intitule\" align=center> $row[4] </td>";
echo "<td class=\"intitule\" align=center> $row[5] </td>";
echo "<td class=\"intitule\" align=center> <a href=\"consOffre.php?id_s=$row[0]\">supprimer</a> </td>";
echo "</tr> ";
}
mysql_free_result($res);
echo "</table>";
}
if(isset($id_s)){
connexion();
mysql_query("delete from offre_stage where id=$id_s");
deconnexion();
}
connexion();
$resultat=mysql_query("select nom from societe where id=$id_societe");
$row=mysql_fetch_row($resultat);
$nom=$row[0];
print("Offre de stage de la societe $nom :<br> <br>");
connexion();
affiche("select * from offre_stage where id_societe=$id_societe");
deconnexion();
?>
merci
A voir également:
- Pb php...
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Retour a la ligne php - Forum Webmastering
- Alert php - Forum PHP
- Retour a la ligne php ✓ - Forum PHP