PHP and Windows INI files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mosscliff

    PHP and Windows INI files

    Are there any PHP scripts for handling windows style INI files

    ie

    [section]
    one = great
    two=not very good
    etc
    [next section]

    Also how do you handle multi-selects from an input field on a form

    The brain is getting too old to work it out myself !!!

    Thanks

    Tim
  • Janwillem Borleffs

    #2
    Re: PHP and Windows INI files

    mosscliff wrote:[color=blue]
    > Are there any PHP scripts for handling windows style INI files
    >[/color]


    [color=blue]
    > Also how do you handle multi-selects from an input field on a form
    >[/color]

    <select name="multiple_ select" multiple="multi ple">
    <option value="value">l abel</option>
    <option value="value2"> label2</option>
    <option value="value3"> label3</option>
    </select>

    foreach ($_POST['multiple_selec t'] as $key => $value) {
    ...
    }


    JW



    Comment

    • mosscliff

      #3
      Re: PHP and Windows INI files

      Many thanks, now I have no excuses, for not finishing, this weekend.
      I am a bit in the dark with regard to the key => value construct, but
      I will give your solution a try and see what prints.

      As an aside, Is it best to use print or echo with PHP. If only
      because it is one less character to parse, I wondered about using echo
      always. I know about the short version, but would prefer to use the
      full word for better documentation.

      Thanks Again

      tim

      "Janwillem Borleffs" <jw@jwscripts.c om> wrote in message news:<4260e48f$ 0$3012$dbd4d001 @news.euronet.n l>...[color=blue]
      > mosscliff wrote:[color=green]
      > > Are there any PHP scripts for handling windows style INI files
      > >[/color]
      >
      > http://www.php.net/manual/en/functio...e-ini-file.php
      >[color=green]
      > > Also how do you handle multi-selects from an input field on a form
      > >[/color]
      >
      > <select name="multiple_ select" multiple="multi ple">
      > <option value="value">l abel</option>
      > <option value="value2"> label2</option>
      > <option value="value3"> label3</option>
      > </select>
      >
      > foreach ($_POST['multiple_selec t'] as $key => $value) {
      > ...
      > }
      >
      >
      > JW[/color]

      Comment

      • ZeldorBlat

        #4
        Re: PHP and Windows INI files

        See this article:



        Comment

        • R. Rajesh Jeba Anbiah

          #5
          Re: PHP and Windows INI files

          Janwillem Borleffs wrote:[color=blue]
          > mosscliff wrote:[/color]
          <snip>[color=blue][color=green]
          > > Also how do you handle multi-selects from an input field on a form
          > >[/color]
          >
          > <select name="multiple_ select" multiple="multi ple">[/color]
          ^^^^^^
          Should be <select name="multiple_ select[]" multiple="multi ple">


          --
          <?php echo 'Just another PHP saint'; ?>
          Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

          Comment

          Working...