IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

affichage d'un erreur inattendue


Sujet :

PHP & Base de données

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

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

    Informations forums :
    Inscription : Avril 2011
    Messages : 65
    Points : 26
    Points
    26
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    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>

  2. #2
    Membre actif
    Profil pro
    Inscrit en
    Février 2009
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 149
    Points : 206
    Points
    206
    Par défaut
    Vérifie bien tes accolades { }

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

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

    Informations forums :
    Inscription : Avril 2011
    Messages : 65
    Points : 26
    Points
    26
    Par défaut
    ok, merci boco

  4. #4
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

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

    Informations forums :
    Inscription : Avril 2011
    Messages : 65
    Points : 26
    Points
    26
    Par défaut
    bonjours,

    désolé, j'ai vérifié...mais toujours le meme probléme...

  5. #5
    Membre actif Avatar de Retrokiller069
    Homme Profil pro
    Étudiant
    Inscrit en
    Octobre 2010
    Messages
    217
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Octobre 2010
    Messages : 217
    Points : 296
    Points
    296
    Par défaut
    Bonjour,

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

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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

  6. #6
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

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

    Informations forums :
    Inscription : Avril 2011
    Messages : 65
    Points : 26
    Points
    26
    Par défaut
    ah, c genial,,merci beaucoup..c'est fait...

Discussions similaires

  1. Erreur inattendue (336)
    Par logisud dans le forum VB 6 et antérieur
    Réponses: 6
    Dernier message: 11/01/2007, 12h25
  2. erreur VB : 'Erreur inattendue; abandon'
    Par sacofan dans le forum VB 6 et antérieur
    Réponses: 1
    Dernier message: 19/12/2006, 21h28
  3. Réponses: 6
    Dernier message: 26/11/2006, 02h14
  4. [vb6] Erreur inattendue
    Par zako dans le forum VB 6 et antérieur
    Réponses: 3
    Dernier message: 29/06/2006, 17h21
  5. Erreur inattendue (1346584902) durant installation win 2000
    Par ccba91 dans le forum Windows Serveur
    Réponses: 1
    Dernier message: 19/10/2005, 14h29

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo