Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD > PHP & MySQL
PHP & MySQL Forum d'entraide sur les fonctions MySQL avec PHP. Avant de poster -> FAQ MySQL, Cours MySQL et Sources MySQL. Pour les questions concernant le moteur MySQL plutôt que les fonctions PHP, merci d'utiliser le forum MySQL.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 30/06/2011, 02h22   #1
 
Homme khmaies guesmi
Étudiant
Inscription : avril 2011
Messages : 63
Détails du profil
Informations personnelles :
Nom : Homme khmaies guesmi
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Opérateur de télécommunications

Informations forums :
Inscription : avril 2011
Messages : 63
Points : -3
Points : -3
Par défaut affichage d'un erreur inattendue

bonjours;

SVP, j'ai besoin d'un coup de main intelligent,,
j'ai un scripte php,,mais lors de compilation sous easy php, il m'indique un erreur
à la ligne 95,,alors que le code se termine à la ligne 94,,et voici le code..
et merci d'avance....
/////////////////////////////

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
session_start();
include("connexion.php");
connect($host,$user,$mot_passe,$db_name);
if ( !session_is_registered("authen_user")){
#echo '<META HTTP-EQUIV="refresh" CONTENT="0;URL=index.php?erreur=404">';
#redirection instantanée
header("location:index.php?erreur=404");
?>
<html>
<body>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="css/style.css" rel="stylesheet">
<title></title>
</head>
<body topmargin="0" leftmargin="0">
&nbsp;
<table width="967" height="902"  border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#FFFFFF" style="border-collapse: collapse">
<tr>
    <td width="100%" height="126" align="left" valign="top">
         <table WIDTH="967" BORDER="0" CELLPADDING="0" CELLSPACING="0">
            <tr>
                <td COLSPAN="6"><img SRC="img/header.jpg" WIDTH="387" HEIGHT="94"></td>
           </tr>
	       <tr>
             <td width="89"><a class="linx" href="user_home.php">Consultation  </a></td>
                <td width="111"><a class="linx" href="new.php">Ajouter nouveau</a></td>
                <td width="467"><a class="linx" href="find7.php">Recherche</a></td>
             <td width="38"><a class="linx" href=""></a></td>
               <td width="175"><a class="linx" href="#6"></a></td>
               <td width="87"><a class="linx" href="deco.php">D&eacute;connecxion</a></td>
          </tr>
		  <tr>
		    <td COLSPAN="6">&nbsp;</td>
		   </tr>
      </table>
    </td>
	<?php
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
$select = "SELECT id FROM pc ORDER BY  id ASC  LIMIT 50";
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);
 
 
// si on a récupéré un résultat on l'affiche.
if($total) {
    echo '<table bgcolor="#FFFFFF">'."\n";
 
        echo '<td bgcolor="#669999"><b><u>id</u></b></td>';
        echo '</tr>'."\n";
 
    while($row = mysql_fetch_array($result)) {
        echo '<tr>';
        echo '<td bgcolor="#CCCCCC">'.$row['id'].'</td>';
        echo '</tr>'."\n";
    }
    echo '</table>'."\n";
 
}
else echo 'Pas d\'enregistrements dans cette table...';
 
$nombre = 50;  // on va afficher 50 résultats par page.
if (!isset($limite)){ $limite = 0; 
 
$path_parts = pathinfo($_SERVER['PHP_SELF']);
$page = $path_parts['id'];
}
 
// initialisation des variable suivant et précédent
$limitesuivante = $limite + $nombre;
$limiteprecedente = $limite - $nombre;
// button "précedent"
//<form action="<?php echo $page; ?>" method="post">
if($limite != 0) {
   <form methode="post" action="<?php echo $page; ?>">
    <input type="submit" name="(????)" value="précédents" />
    <input type="hidden" name="limite"" value="<?php echo $limiteprecedente; ?>"/>
    </form>
 
}
 
<?php
if($limitesuivante < $total) {
?>
 
  <form methode="post" action="<?php echo $page;?>" >
    <input type="submit" name="(????)" value="="suivants"/>
    <input type="hidden" name="limite" value="<?php echo $limitesuivante; ?>" />
   </form>	
}
}
</body>
</html>
pfakhmaies est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2011, 02h29   #2
Membre actif
 
Inscription : février 2009
Messages : 150
Détails du profil
Informations forums :
Inscription : février 2009
Messages : 150
Points : 198
Points : 198
Vérifie bien tes accolades { }
nextdev est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2011, 02h41   #3
 
Homme khmaies guesmi
Étudiant
Inscription : avril 2011
Messages : 63
Détails du profil
Informations personnelles :
Nom : Homme khmaies guesmi
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Opérateur de télécommunications

Informations forums :
Inscription : avril 2011
Messages : 63
Points : -3
Points : -3
ok, merci boco
pfakhmaies est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2011, 09h00   #4
 
Homme khmaies guesmi
Étudiant
Inscription : avril 2011
Messages : 63
Détails du profil
Informations personnelles :
Nom : Homme khmaies guesmi
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Opérateur de télécommunications

Informations forums :
Inscription : avril 2011
Messages : 63
Points : -3
Points : -3
bonjours,

désolé, j'ai vérifié...mais toujours le meme probléme...
pfakhmaies est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2011, 13h01   #5
Membre confirmé
 
Avatar de Retrokiller069
 
Homme Bertrand
Étudiant
Inscription : octobre 2010
Messages : 216
Détails du profil
Informations personnelles :
Nom : Homme Bertrand
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : octobre 2010
Messages : 216
Points : 268
Points : 268
Bonjour,

tu as plein d'erreur sur les ouvertures et fermetures des balises php, voici le code avec les balises php bien placé:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
 
<?php
session_start();
include("connexion.php");
connect($host,$user,$mot_passe,$db_name);
if ( !session_is_registered("authen_user")){
#echo '<META HTTP-EQUIV="refresh" CONTENT="0;URL=index.php?erreur=404">';
#redirection instantanée
header("location:index.php?erreur=404");
?>
<html>
<body>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="css/style.css" rel="stylesheet">
<title></title>
</head>
<body topmargin="0" leftmargin="0">
&nbsp;
<table width="967" height="902"  border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#FFFFFF" style="border-collapse: collapse">
<tr>
    <td width="100%" height="126" align="left" valign="top">
         <table WIDTH="967" BORDER="0" CELLPADDING="0" CELLSPACING="0">
            <tr>
                <td COLSPAN="6"><img SRC="img/header.jpg" WIDTH="387" HEIGHT="94"></td>
           </tr>
	       <tr>
             <td width="89"><a class="linx" href="user_home.php">Consultation  </a></td>
                <td width="111"><a class="linx" href="new.php">Ajouter nouveau</a></td>
                <td width="467"><a class="linx" href="find7.php">Recherche</a></td>
             <td width="38"><a class="linx" href=""></a></td>
               <td width="175"><a class="linx" href="#6"></a></td>
               <td width="87"><a class="linx" href="deco.php">D&eacute;connecxion</a></td>
          </tr>
		  <tr>
		    <td COLSPAN="6">&nbsp;</td>
		   </tr>
      </table>
    </td>
	<?php
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
$select = "SELECT id FROM pc ORDER BY  id ASC  LIMIT 50";
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);
 
 
// si on a récupéré un résultat on l'affiche.
if($total) {
    echo '<table bgcolor="#FFFFFF">'."\n";
 
        echo '<td bgcolor="#669999"><b><u>id</u></b></td>';
        echo '</tr>'."\n";
 
    while($row = mysql_fetch_array($result)) {
        echo '<tr>';
        echo '<td bgcolor="#CCCCCC">'.$row['id'].'</td>';
        echo '</tr>'."\n";
    }
    echo '</table>'."\n";
 
}
else echo 'Pas d\'enregistrements dans cette table...';
 
$nombre = 50;  // on va afficher 50 résultats par page.
if (!isset($limite)){ $limite = 0; 
 
$path_parts = pathinfo($_SERVER['PHP_SELF']);
$page = $path_parts['id'];
}
 
// initialisation des variable suivant et précédent
$limitesuivante = $limite + $nombre;
$limiteprecedente = $limite - $nombre;
?>
<!--  button "précedent" 
//<form action="#" method="post">-->
<?php 
if($limite != 0) {?>
   <form methode="post" action="<?php echo $page; ?>">
    <input type="submit" name="(????)" value="précédents" />
    <input type="hidden" name="limite" value="<?php echo $limiteprecedente; ?>"/>
    </form>
 
<?php
}
 
if($limitesuivante < $total) {
?>
  <form methode="post" action="<?php echo $page;?>" >
    <input type="submit" name="(????)" value="="suivants"/>
    <input type="hidden" name="limite" value="<?php echo $limitesuivante; ?>" />
   </form>	
<?php 
}
}
?>
</body>
</html>
tiens nous au courant...
__________________
Ce n'est pas ce que nous voulons faire qui est impossible mais ce sont les moyens à sa mise en oeuvre qui peuvent le paraître

Ps: N'oubliez pas SVP
Retrokiller069 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2011, 14h05   #6
 
Homme khmaies guesmi
Étudiant
Inscription : avril 2011
Messages : 63
Détails du profil
Informations personnelles :
Nom : Homme khmaies guesmi
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Opérateur de télécommunications

Informations forums :
Inscription : avril 2011
Messages : 63
Points : -3
Points : -3
ah, c genial,,merci beaucoup..c'est fait...
pfakhmaies est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 03h37.


 
 
 
 
Partenaires

Hébergement Web