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

Langage PHP Discussion :

[Tableaux] Modifier un tableau sur une page en PHP [Fait]


Sujet :

Langage PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    382
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Mai 2006
    Messages : 382
    Par défaut [Tableaux] Modifier un tableau sur une page en PHP
    bonjour a tous,

    je voudrais savoir comment je peux faire pour modifier un tableau directement sur la page en php??? c'est-à-dire modifier le tableau pour qu'il s'actualise directement.

    je suis debutant et je ne sais pas par où commencer pour réaliser cette application

    merci d'avance

    salutations.

  2. #2
    Expert confirmé
    Avatar de mathieu
    Profil pro
    Inscrit en
    Juin 2003
    Messages
    10 670
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 10 670
    Par défaut
    Tu peux utiliser AJAX pour faire ça.
    Tu trouvera plus d'informations là :
    http://php.developpez.com/cours/#bibliotheques-ajax

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    382
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Mai 2006
    Messages : 382
    Par défaut
    est ce qu'on faire cette manipulation sans l'aide d'AJAX, est ce qu'on peut tout faire en php avec l'aide d'un bouton actualiser qui stocke les donnees modifiees et qui les remplace dans le tableau??????

    je galere dejà avec le php alors si je me met à l'AJAX, je ne vais plus m'en sortir

    merci

    ciao

  4. #4
    Membre éprouvé

    Inscrit en
    Janvier 2006
    Messages
    969
    Détails du profil
    Informations forums :
    Inscription : Janvier 2006
    Messages : 969
    Par défaut
    Si ton tableau est rempli par une requête, c'est tout à fait possible de faire un petit bouton "reload" pour recharger la page.
    Il "suffit" de faire un tableau dont chaque case est un formulaire et un <input type=text>, et en cliquant sur recharger, de sauvegarder les contenus et de recharger la page.

  5. #5
    Membre éclairé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    382
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Mai 2006
    Messages : 382
    Par défaut
    oué tu as bien faite de mettre des "" à "suffit" car ça va être chaud à faire mais bon je vais essayer

    merci

    ciao

  6. #6
    Membre éclairé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    382
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Mai 2006
    Messages : 382
    Par défaut
    bon voila j'ai commencé mon tableau et je veux juste te demander si je suis bien parti :

    par contre si je met des <input...> et dois mettre un <form>, mais je ne sais pas vers quelle page je dois diriger ma modification puisque tout doit se faire sur la meme page.

    voici le début de mon tableau :

    Code html : 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
    <body>
    <form method="get" action="">
    <table border="1" width="100%" height="378" bdcolor="#FF0000">
      <tr>
        <td width="100%" colspan="6" height="28">
          <p align="center"><b><i><u><font color="#FF0000" size="5">Mois en cours</font></u></i></b></td>
      </tr>
      <tr>
        <td width="16%" height="19">
          <p align="center"><font color="#FF0000"><b>DECEMBRE</b></font></td>
        <td width="16%" align="center" height="19"><b>Réalisé</b></td>
        <td width="17%" align="center" height="19"><b>Objectif</b></td>
        <td width="17%" align="center" height="19"><b>Réalisation/Objectif</b></td>
        <td width="17%" align="center" height="19"><b>Réalisé en 2005</b></td>
        <td width="17%" align="center" height="19"><b>Réalisation/2005</b></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>SD France</b></td>
        <td width="16%" height="19"><input type="text" name="chiffre1" value="603 867 €"></td>
        <td width="17%" height="19"><input type="text" name="chiffre2" value="838 866 €"></td>
        <td width="17%" height="19"><input type="text" name="chiffre3" value="72.0 %"></td>
        <td width="17%" height="19"><input type="text" name="chiffre4" value="780 531 €"></td>
        <td width="17%" height="19"><input type="text" name="chiffre5" value="74.4 %"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>SD av instances</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>Export SD</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>Export av instances</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>MDD-ST</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="38"><b>Total SD av instances</b></td>
        <td width="16%" height="38"></td>
        <td width="17%" height="38"></td>
        <td width="17%" height="38"></td>
        <td width="17%" height="38"></td>
        <td width="17%" height="38"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>VS France</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>VS av instances</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>Export VS</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>Export av instances</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>Total vs av instances</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
      <tr>
        <td width="16%" align="center" height="19"><b>Total général</b></td>
        <td width="16%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
        <td width="17%" height="19"></td>
      </tr>
    </table>
    </form>
     
    </body>

  7. #7
    Expert confirmé
    Avatar de mathieu
    Profil pro
    Inscrit en
    Juin 2003
    Messages
    10 670
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 10 670
    Par défaut
    oui on peut le faire sans AJAX et donc sans Javascript mais dans ce cas ta page se rechargera.
    Ce que tu veux en fait, c'est un simple formulaire avec une zone de texte et quand on clique sur le bouton d'enregistrement, la page se recharge avec la nouvelle valeur

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. tableau sur une page en paysage
    Par jefkiller dans le forum Tableaux - Graphiques - Images - Flottants
    Réponses: 5
    Dernier message: 27/04/2011, 15h07
  2. Centrer un grand tableau sur une page
    Par pantouane dans le forum Mise en forme
    Réponses: 3
    Dernier message: 28/08/2010, 22h33
  3. Réponses: 7
    Dernier message: 26/04/2007, 12h04
  4. Réponses: 2
    Dernier message: 17/02/2007, 12h34
  5. [Tableaux] récupérer un tableau sur une autre page
    Par samsso2005 dans le forum Langage
    Réponses: 3
    Dernier message: 27/01/2006, 22h58

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