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 Perl Discussion :

accolade dans champ file


Sujet :

Langage Perl

  1. #1
    Nouveau Candidat au Club
    Inscrit en
    Décembre 2007
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Décembre 2007
    Messages : 2
    Points : 1
    Points
    1
    Par défaut accolade dans champ file
    J'aimerai poster un formulaire avec perl mais l'un des champs de type file porte le nom file[] (avec une accolade), voir http://upload.liveleak.com/media?a=add_media

    Comment puis utiliser ce nom dans mon script avant l'envoi du post ?

    merci d'avance

    Fabrice

  2. #2
    Membre confirmé
    Avatar de Schmorgluck
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    371
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Mai 2006
    Messages : 371
    Points : 558
    Points
    558
    Par défaut
    Ton lien ne donne rien. Pourrais-tu être plus clair ? Au fait, tu ne confondrait pas crochets et accolades, par hasard ?
    There's nothing like $HOME!

  3. #3
    Nouveau Candidat au Club
    Inscrit en
    Décembre 2007
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Décembre 2007
    Messages : 2
    Points : 1
    Points
    1
    Par défaut Ben si
    Oui, c'est un crochet ...

    J'aimerai pouvoir poster ce formulaire automatiquement avec LWP mais je ne sait comment formuler la requete car le nom du champ comporte ces crochets

    Voici le formulaire
    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
    <form action="http://upload.liveleak.com/media?a=add_media" method="post" enctype="multipart/form-data" name="form1" onSubmit="return check_media_form(this);">
    
    <div id="hdr">Add Media</div>
      <table width="875" class="pod">
        <tr>
          <td colspan="2" align="right" valign="top"></td>
          </tr>
    	      <tr>
          <td width="202" align="right" valign="top">Note:</td>
          <td width="661"><strong>We do not allow any pornographic, copyrighted or illegal media! <br>
    
            Please see our <a href="faq" target="_blank">FAQ</a>      </strong></td>
        </tr>
        <tr>
          <td align="right" valign="top">Select File(s)</td>
          <td>
            <input name="file[]" type="file" id="file1" size="40">
            (100 MB max) <br>
    
                  Multiple Files: <a href="media?a=add_media&m=2">2</a> - <a href="media?a=add_media&m=5">5</a> - <a href="media?a=add_media&m=10">10</a> - <a href="media?a=add_media&m=15">15</a> - <a href="media?a=add_media&m=20">20</a> - <a href="media?a=add_media&m=20">20</a></td>
    
        </tr>
        <tr>
          <td align="right" valign="top">Title</td>
          <td><input name="title" type="text" id="title" size="60"></td>
        </tr>
        <tr>
          <td align="right" valign="top">Description</td>
          <td><textarea name="description" cols="50" rows="7" wrap="VIRTUAL" id="description"></textarea>
    
            <br>
            * To add links, use BBcode: Link Title</td>
        </tr>
        <tr>
          <td align="right">Tags:</td>
          <td><input name="tag_string" type="text" id="tag_string" size="50">
          (comma seperated!) </td>
    
        </tr>
        <tr>
          <td align="right">Category:</td>
          <td><select name="category_id">
    	      <option value="" selected>Select Category</option>
              <option value="1">News (War, Politics, Disasters etc)</option>
              <option value="3">Personal (Accident, Health, Bizarre) </option>
    
              <option value="4">Creative (Compilation, Spoof etc)</option>
              <option value="5">Work Related (Law Enforcement, Soldier, Forensic Detective, Medical etc)</option>
              <option value="2">Entertainment (Humor, Commercial, Music, Sexy)</option>
    		  <option value="10">Miscellaneous (Other)</option>
          </select></td>
        </tr>
        <tr>
    
          <td align="right">Mature Content </td>
          <td>
            <select name="is_mature" id="is_mature">
              <option value="1" selected>Yes (For Mature Audience)</option>
              <option value="0">No (Family Friendly)</option>
          </select></td>
        </tr>
    
        <tr>
          <td align="right">Contains Graphic Elements </td>
          <td>
            <select name="is_graphic">
              <option value="0" selected>No</option>
              <option value="1">Yes</option>
            </select>
    
          </td>
        </tr>
        <tr>
          <td align="right">Public or Private? </td>
          <td><select name="public_private" id="public_private">
              <option value="public" selected>Public (everyone can see this item)</option>
              <option value="private">Private (only people with the direct url can view this item)</option>
    
            </select>
              <input name="process" type="hidden" value="1">
              <input name="token" type="hidden" value="bd4d4c57a2818cef91d9502eb35cd701">
              <input name="user_id" type="hidden" id="user_id" value="1082744">
    </td>
        </tr>
        <tr>
          <td align="right">Allow Comments </td>
          <td><select name="allow_comments" id="allow_comments">
    
            <option value="1" selected>Yes</option>
            <option value="0">No</option>
                                  </select></td>
        </tr>
    	    <tr align="center">
          <td colspan="2" id="upload_button_td"><input type="submit" name="submit_button" value="Continue &gt;&gt;"></td>
          </tr>
      </table>
    
      </form>

    fabrice

Discussions similaires

  1. Restreindre le type de fichier dans un champs file
    Par le_chomeur dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 19/11/2007, 09h22
  2. Récupérer un champ file dans un formulaire
    Par dedel53 dans le forum Langage
    Réponses: 3
    Dernier message: 20/03/2007, 11h05
  3. Valeur par defaut dans un champ file
    Par benkunz dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 24/10/2006, 11h40
  4. Réponses: 4
    Dernier message: 22/10/2006, 00h23
  5. [VBS] Compléter un Champ "file" dans un formulaire IE
    Par kevain_09 dans le forum VBScript
    Réponses: 3
    Dernier message: 20/09/2006, 16h23

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