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 :

probleme forum php


Sujet :

PHP & Base de données

  1. #1
    Membre averti
    Inscrit en
    Décembre 2008
    Messages
    67
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 67
    Par défaut probleme forum php
    bonjour
    j'ai un probleme avec mon forum que j'ai crée grace a un tuto est voila quand je vais sur un sujet que j'ai crée pour example et il y que le premier sujet et les reponse ne sont pas afficher voila le code
    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
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
     
    <?php
    $host="localhost"; // Host name 
    $username="root"; // Mysql username 
    $password=""; // Mysql password 
    $db_name="ml"; // Database name 
    $tbl_name="forum_question"; // Table name 
     
    // Connect to server and select databse.
    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
    mysql_select_db("$db_name")or die("cannot select DB");
     
    // get value of id that sent from address bar 
    $id=$_GET['id'];
     
    $sql="SELECT * FROM $tbl_name WHERE id='$id'";
    $result=mysql_query($sql);
     
    $rows=mysql_fetch_array($result);
    ?>
    <table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
    <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="1" bgcolor="#FFFFFF">
    <tr>
    <td bgcolor="#F8F7F1"><strong>Date : </strong><?php echo $rows['datetime']; ?></td>
    </tr>
    <tr>
    <td bgcolor="#F8F7F1"><strong>login :</strong> <?php echo $rows['name']; ?> <strong>Email : </strong><?php echo $rows['email'];?></td>
    </tr>
    <tr>
    <td bgcolor="#F8F7F1"><strong><? echo $rows['topic']; ?></strong></td>
    </tr>
    <tr>
    <td bgcolor="#F8F7F1"><?php echo $rows['detail']; ?></td>
    </tr>
    </table></td>
    </tr>
    </table>
    <BR>
    <?php
    $tbl_name2="forum_answer"; // Switch to table "forum_answer" 
     
    $sql2="SELECT (*) FROM $tbl_name2 WHERE question_id='$id'";
    $result2=mysql_query($sql2);
     
    while($rows= mysql_fetch_array($result2)){ // voila la ligne a l'erreur
    ?>
    <table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
    <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
    <tr>
    <td bgcolor="#F8F7F1"><strong>Date/Time</strong></td>
    <td bgcolor="#F8F7F1">:</td>
    <td bgcolor="#F8F7F1"><?php echo $rows['a_datetime']; ?></td>
    </tr>
    <tr>
    <td width="18%" bgcolor="#F8F7F1"><strong>Name</strong></td>
    <td width="5%" bgcolor="#F8F7F1">:</td>
    <td width="77%" bgcolor="#F8F7F1"><?php echo $rows['a_name']; ?></td>
    </tr>
    <tr>
    <td bgcolor="#F8F7F1"><strong>Email</strong></td>
    <td bgcolor="#F8F7F1">:</td>
    <td bgcolor="#F8F7F1"><?php echo $rows['a_email']; ?></td>
    </tr>
    <tr>
    <td bgcolor="#F8F7F1"><strong>ID</strong></td>
    <td bgcolor="#F8F7F1">:</td>
    <td bgcolor="#F8F7F1"><?php echo $rows['a_id']; ?></td>
    </tr>
    <tr>
    <td bgcolor="#F8F7F1"><strong>Answer</strong></td>
    <td bgcolor="#F8F7F1">:</td>
    <td bgcolor="#F8F7F1"><?php echo $rows['a_answer']; ?></td>
    </tr>
    </table></td>
    </tr>
    </table><br>
     
    <?php
    }
     
    $sql3="SELECT view FROM $tbl_name WHERE id='$id'";
    $result3=mysql_query($sql3);
     
    $rows=mysql_fetch_array($result3);
    $view=$rows['view'];
     
    // if have no counter value set counter = 1
    if(empty($view)){
    $view=1;
    $sql4="INSERT INTO $tbl_name(view) VALUES('$view') WHERE id='$id'";
    $result4=mysql_query($sql4);
    }
     
    // count more value
    $addview=$view+1;
    $sql5="update $tbl_name set view='$addview' WHERE id='$id'";
    $result5=mysql_query($sql5);
     
    mysql_close();
    ?>
    <BR>
    <table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
    <form name="form1" method="post" action="add_answer.php">
    <td>
    <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
    <tr>
    <td width="18%"><strong>Name</strong></td>
    <td width="3%">:</td>
    <td width="79%"><input name="a_name" type="text" id="a_name" size="45"></td>
    </tr>
    <tr>
    <td><strong>Email</strong></td>
    <td>:</td>
    <td><input name="a_email" type="text" id="a_email" size="45"></td>
    </tr>
    <tr>
    <td valign="top"><strong>reponse</strong></td>
    <td valign="top">:</td>
    <td><textarea name="a_answer" cols="45" rows="3" id="a_answer"></textarea></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><input name="id" type="hidden" value="<?php echo $id; ?>"></td>
    <td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td>
    </tr>
    </table>
    </td>
    </form>
    </tr>
    </table>
    et en plus il y a un probleme avec la ligne 46 je crois ( je l'ai preciser )
    merci

  2. #2
    Modératrice
    Avatar de Celira
    Femme Profil pro
    Développeuse PHP/Java
    Inscrit en
    Avril 2007
    Messages
    8 633
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeuse PHP/Java
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2007
    Messages : 8 633
    Par défaut
    Bonjour

    Il est difficile de résoudre une erreur dont on ignore les tenants et les aboutissants. En clair, nous indiquer la ligne qui pose problème, c'est bien. Nous dire quel est le problème et nous donner le message d'erreur, ce serait mieux

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    $tbl_name2="forum_answer"; // Switch to table "forum_answer" 
     
    $sql2="SELECT (*) FROM $tbl_name2 WHERE question_id='$id'";
    $result2=mysql_query($sql2);
     
    while($rows= mysql_fetch_array($result2)){ // voila la ligne a l'erreur
    Vu le contexte je parierai sur une erreur de type "supplied argument is not a valid MySQL result resource"
    Modératrice PHP
    Aucun navigateur ne propose d'extension boule-de-cristal : postez votre code et vos messages d'erreurs. (Rappel : "ça ne marche pas" n'est pas un message d'erreur)
    Cherchez un peu avant poser votre question : Cours et Tutoriels PHP - FAQ PHP - PDO une soupe et au lit !.

    Affichez votre code en couleurs : [CODE=php][/CODE] (bouton # de l'éditeur) et [C=php][/C]

  3. #3
    Membre averti
    Inscrit en
    Décembre 2008
    Messages
    67
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 67
    Par défaut
    ah oui mince voila le message d'erreur

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\FORUM\view_topic.php on line 46

    et je voudrais que sa affiche les reponse données car moi dans mon forum sa affiche que les probleme et pas les reponse

  4. #4
    Modératrice
    Avatar de Celira
    Femme Profil pro
    Développeuse PHP/Java
    Inscrit en
    Avril 2007
    Messages
    8 633
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeuse PHP/Java
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2007
    Messages : 8 633
    Par défaut
    Correction de l'erreur "supplied argument is not a valid MySQL result resource"
    Ta requête renvoie probablement une erreur. Essaye de la récupérer par mysql_error
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    $sql2="SELECT (*) FROM $tbl_name2 WHERE question_id='$id'";
    $result2=mysql_query($sql2) or die ('Erreur sur '.$sql2.'<br/>'.mysql_error());
    Modératrice PHP
    Aucun navigateur ne propose d'extension boule-de-cristal : postez votre code et vos messages d'erreurs. (Rappel : "ça ne marche pas" n'est pas un message d'erreur)
    Cherchez un peu avant poser votre question : Cours et Tutoriels PHP - FAQ PHP - PDO une soupe et au lit !.

    Affichez votre code en couleurs : [CODE=php][/CODE] (bouton # de l'éditeur) et [C=php][/C]

  5. #5
    Membre averti
    Inscrit en
    Décembre 2008
    Messages
    67
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 67
    Par défaut
    sa me mais sa
    Erreur sur SELECT (*) FROM forum_answer WHERE question_id=''
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) FROM forum_answer WHERE question_id=''' at line 1

  6. #6
    Membre chevronné
    Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2008
    Messages
    504
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Décembre 2008
    Messages : 504
    Par défaut
    Ta variable $id est vide...
    Tu dois donc t'assurer qu'elle conteint bien une valeur avant de la passer à ta requete (et a ta place, je vérifierai le type pour éviter les failles de sécurité par injection SQL)

  7. #7
    Membre averti
    Inscrit en
    Décembre 2008
    Messages
    67
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 67
    Par défaut
    voila mon probleme maintenant :
    Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\forum 2\postok.php on line 169

    et voila la ligne ( je l'ai preciser car la ces toutes la requet ):

    $ins =mysql_query('INSERT INTO forum_topic_view
    (tv_id, tv_topic_id, tv_forum_id, tv_post_id, tv_poste)
    VALUES('.intval($_SESSION['id']).', '.$nouveautopic.', '.$forum.', '.$nouveaupost.', "1" )'); // voila la ligne

  8. #8
    Membre averti
    Inscrit en
    Décembre 2008
    Messages
    67
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 67
    Par défaut
    j'ai changé le code et voila maitenant l'erreur :
    Parse error: syntax error, unexpected T_CASE in C:\wamp\www\forum 2\poster.php on line 221

    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
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    <?php
    //Cette fonction doit être appelée avant tout code html
    session_start();
    $balises = true;
    //On donne ensuite un titre à la page, puis on appelle notre fichier debut.php
    $titre = "Poster";
    
    ?>
    <body>
    <div id="banniere"></div>
    <div id="corps_forum">
    
    <head><script>
    function bbcode(bbdebut, bbfin)
    {
    var input = window.document.formulaire.message;
    input.focus();
    if(typeof document.selection != 'undefined')
    {
    var range = document.selection.createRange();
    var insText = range.text;
    range.text = bbdebut + insText + bbfin;
    range = document.selection.createRange();
    if (insText.length == 0)
    {
    range.move('character', -bbfin.length);
    }
    else
    {
    range.moveStart('character', bbdebut.length + insText.length + bbfin.length);
    }
    range.select();
    }
    else if(typeof input.selectionStart != 'undefined')
    {
    var start = input.selectionStart;
    var end = input.selectionEnd;
    var insText = input.value.substring(start, end);
    input.value = input.value.substr(0, start) + bbdebut + insText + bbfin + input.value.substr(end);
    var pos;
    if (insText.length == 0)
    {
    pos = start + bbdebut.length;
    }
    else
    {
    pos = start + bbdebut.length + insText.length + bbfin.length;
    }
    input.selectionStart = pos;
    input.selectionEnd = pos;
    }
     
    else
    {
    var pos;
    var re = new RegExp('^[0-9]{0,3}$');
    while(!re.test(pos))
    {
    pos = prompt("insertion (0.." + input.value.length + "):", "0");
    }
    if(pos > input.value.length)
    {
    pos = input.value.length;
    }
    var insText = prompt("Veuillez taper le texte");
    input.value = input.value.substr(0, pos) + bbdebut + insText + bbfin + input.value.substr(pos);
    }
    }
    function smilies(img)
    {
    window.document.formulaire.message.value += '' + img + '';
    }
    </script>
    </head> 
    <?php
    //On se connecte
    include("includes/identifiants.php");
    mysql_connect($adresse, $nom, $motdepasse);
    mysql_select_db($database);
    //Qu'est ce qu'on veut faire ? poster, répondre ou éditer ?
    $action = htmlspecialchars($_GET['action']);
     
    //Si on veut poster un nouveau topic, la variable f se trouve dans l'url,
    //On récupère certaines valeurs
    if (isset($_GET['f']))
    {
    $forum = (int) $_GET['f'];
    $requete1 = mysql_query('
    SELECT forum_name, auth_view, auth_post, auth_topic, auth_annonce, auth_modo
    FROM forum_forum
    WHERE forum_id ="'.$forum.'"') or die(mysql_error());
    $data1 = mysql_fetch_array($requete1);
    ?>
     
    <p>
    <a href ="./index.php">Index du forum</a> /
    <a href="./voirforum.php?f=<?php echo ''.$forum.''; ?>"><?php echo stripslashes(htmlspecialchars($data1['forum_name'])); ?></a></p>
     
    <?php
    }
     
    //Sinon c'est un nouveau message, on a la variable t et
    //On récupère f grâce à une requête
    elseif (isset($_GET['t']))
    {
    $topic = (int) $_GET['t'];
    $requete1 = mysql_query('
    SELECT topic_titre, forum_topic.forum_id,
    forum_name, auth_view, auth_post, auth_topic, auth_annonce, auth_modo
    FROM forum_topic
    LEFT JOIN forum_forum ON forum_forum.forum_id = forum_topic.forum_id
    WHERE topic_id ="'.$topic.'"')or die(mysql_error());
    $data1 = mysql_fetch_array($requete1);
    $forum = $data1['forum_id'];
    ?>
     
    <p>
    <a href ="./index.php">Index du forum</a> /
    <a href="./voirforum.php?f=<?php echo $data1['forum_id'] ?>"><?php echo stripslashes(htmlspecialchars($data1['forum_name'])); ?></a> /
    <a href="./voirtopic.php?t=<?php echo $topic ?>"><?php echo stripslashes(htmlspecialchars($data1['topic_titre'])); ?></a></p>
    <?php
    }
     
    //Enfin sinon c'est au sujet de la modération(on verra plus tard en détail)
    //On ne connait que le post, il faut chercher le reste
    elseif (isset ($_GET['p']))
    {
    $post = (int) $_GET['p'];
    $requete1 = mysql_query('
    SELECT post_createur, forum_post.topic_id, topic_titre, forum_topic.forum_id,
    forum_name, auth_view, auth_post, auth_topic, auth_annonce, auth_modo
    FROM forum_post
    LEFT JOIN forum_topic ON forum_topic.topic_id = forum_post.topic_id
    LEFT JOIN forum_forum ON forum_forum.forum_id = forum_topic.forum_id
    WHERE forum_post.post_id ="'.$post.'"')or die(mysql_error());
    $data1 = mysql_fetch_array($requete1);
    $topic = $data1['topic_id'];
    $forum = $data1['forum_id'];
    ?>
     
    <p><a href ="./index.php">Index du forum</a> /
    <a href="./voirforum.php?f=<?php echo $forum ?>"><?php echo stripslashes(htmlspecialchars($data1['forum_name'])); ?></a> /
    <a href="./voirtopic.php?t=<?php echo $topic ?>"><?php echo stripslashes(htmlspecialchars($data1['topic_titre'])); ?></a></p>
    <?php
    }
     
     
    //Ici on s'intéresse au visiteur
    if (isset($_SESSION['pseudo'])) // Si le membre est connecté
    {
           
            //Voici les options
            echo'<p>Vous êtes connecté en tant que
            <a href="./voirprofil.php?m='.intval($_SESSION['id']).'&action=consulter">
            '.stripslashes(htmlspecialchars($_SESSION['pseudo'])).'</a><br />
            <a href="./voirprofil.php?action=modifier">Modifier mon profil</a><br />
            <a href="./messagesprives.php">Consulter mes messages privés</a><br />
            <a href ="./deconnexion.php">Se déconnecter</a><br /></p>';
     
    }
     
    // Sinon l'accès à cette page est interdit ! ^^
    else
    {
    echo 'Désolé, vous devez être enregistré pour poster</div></body></html>';
    exit();
    }
    ?>
    <?php
    switch($action)
    {
    case "repondre": //Premier cas : on souhaite répondre
    //Ici, on affiche le formulaire de réponse
    break;
     
    case "nouveautopic": //Deuxième cas : on souhaite créer un nouveau topic
    //Ici, on affiche le formulaire de nouveau topic
    break;
     
    //D'autres cas viendront s'ajouter là plus tard :p
     
    default; //Si jamais c'est aucun de ceux-là, c'est qu'il y a eu un problème :o
    echo'<h2>Cette action est impossible</h2>';
     
    } //Fin du switch
    ?>
    
    <?
    switch($action)
    {
    case "repondre": switch ;//Premier cas on souhaite répondre
    ?>
    <h1>Poster une réponse</h1>
     
    <form method="post" action="postok.php?action=repondre&amp;t=<?php echo $topic ?>" name="formulaire">
     
    <fieldset><legend>Mise en forme</legend>
    <input type="button" id="gras" name="gras" value="Gras" onClick="javascript:bbcode('[g]', '[/g]');return(false)" />
    <input type="button" id="italic" name="italic" value="Italic" onClick="javascript:bbcode('', '');return(false)" />
    <input type="button" id="souligné" name="souligné" value="Souligné" onClick="javascript:bbcode('', '');return(false)" />
    <input type="button" id="lien" name="lien" value="Lien" onClick="javascript:bbcode('', '');return(false)" />
    <br /><br />
    <img src="./images/smileys/heureux.gif" title="heureux" alt="heureux" onClick="javascript:smilies(' :D ');return(false)" />
    <img src="./images/smileys/lol.gif" title="lol" alt="lol" onClick="javascript:smilies(' :lol: ');return(false)" />
    <img src="./images/smileys/triste.gif" title="triste" alt="triste" onClick="javascript:smilies(' :triste: ');return(false)" />
    <img src="./images/smileys/cool.gif" title="cool" alt="cool" onClick="javascript:smilies(' :frime: ');return(false)" />
    <img src="./images/smileys/rire.gif" title="rire" alt="rire" onClick="javascript:smilies(' XD ');return(false)" />
    <img src="./images/smileys/confus.gif" title="confus" alt="confus" onClick="javascript:smilies(' :s ');return(false)" />
    <img src="./images/smileys/choc.gif" title="choc" alt="choc" onClick="javascript:smilies(' :o ');return(false)" />
    <img src="./images/smileys/question.gif" title="?" alt="?" onClick="javascript:smilies(' :interrogation: ');return(false)" />
    <img src="./images/smileys/exclamation.gif" title="!" alt="!" onClick="javascript:smilies(' :exclamation: ');return(false)" />
    </fieldset>
     
    <fieldset><legend>Message</legend><textarea cols="80" rows="8" id="message" name="message"></textarea></fieldset>
     
    <input type="submit" name="submit" value="Envoyer" />
    <input type="reset" name = "Effacer" value = "Effacer"/>
    </p></form>
    <?php
    
    case "nouveautopic": 
    break;
    	
    ?>
     
    <h1>Nouveau topic</h1>
    <form method="post" action="postok.php?action=nouveautopic&amp;f=<?php echo $forum ?>" name="formulaire">
     
    <fieldset><legend>Titre</legend>
    <input type="text" size="80" id="titre" name="titre" /></fieldset>
     
    <fieldset><legend>Mise en forme</legend>
    <input type="button" id="gras" name="gras" value="Gras" onClick="javascript:bbcode('[g]', '[/g]');return(false)" />
    <input type="button" id="italic" name="italic" value="Italic" onClick="javascript:bbcode('', '');return(false)" />
    <input type="button" id="souligné" name="souligné" value="Souligné" onClick="javascript:bbcode('', '');return(false)" />
    <input type="button" id="lien" name="lien" value="Lien" onClick="javascript:bbcode('', '');return(false)" />
    <br /><br />
    <img src="./images/smileys/heureux.gif" title="heureux" alt="heureux" onClick="javascript:smilies(':D');return(false)" />
    <img src="./images/smileys/lol.gif" title="lol" alt="lol" onClick="javascript:smilies(':lol:');return(false)" />
    <img src="./images/smileys/triste.gif" title="triste" alt="triste" onClick="javascript:smilies(':triste:');return(false)" />
    <img src="./images/smileys/cool.gif" title="cool" alt="cool" onClick="javascript:smilies(':frime:');return(false)" />
    <img src="./images/smileys/rire.gif" title="rire" alt="rire" onClick="javascript:smilies('XD');return(false)" />
    <img src="./images/smileys/confus.gif" title="confus" alt="confus" onClick="javascript:smilies(':s');return(false)" />
    <img src="./images/smileys/choc.gif" title="choc" alt="choc" onClick="javascript:smilies(':O');return(false)" />
    <img src="./images/smileys/question.gif" title="?" alt="?" onClick="javascript:smilies(':interrogation:');return(false)" />
    <img src="./images/smileys/exclamation.gif" title="!" alt="!" onClick="javascript:smilies(':exclamation:');return(false)" /></fieldset>
     
    <fieldset><legend>Message</legend>
    <textarea cols="80" rows="8" id="message" name="message"></textarea>
    <label><input type="radio" name="mess" value="Annonce" />Annonce</label>
    <label><input type="radio" name="mess" value="Message" checked="checked" />Topic</label>
    </fieldset>
    <p>
    <input type="submit" name="submit" value="Envoyer" />
    <input type="reset" name = "Effacer" value = "Effacer" /></p>
    </form>
    <?php
    break;
     
    //D'autres cas viendront s'ajouter ici par la suite
    ?>
    <?php
    default; //Si jamais c'est aucun de ceux là c'est qu'il y a eu un problème :o
    echo'<p>Cette action est impossible</p>';
    } //Fin du switch
    mysql_close();
    ?>
    </div>
    </body>
    </html>
    merci

Discussions similaires

  1. [Conception] probleme d'id pour cree un forum php
    Par ghyslain dans le forum PHP & Base de données
    Réponses: 3
    Dernier message: 02/05/2006, 19h39
  2. probleme postgresql php
    Par jbaudens dans le forum PostgreSQL
    Réponses: 10
    Dernier message: 14/04/2005, 12h46

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