Web Analytics Made Easy -
StatCounter How To Insert Form Variables Into PHP Files & Then ZIP? - CodingForum

Announcement

Collapse
No announcement yet.

How To Insert Form Variables Into PHP Files & Then ZIP?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To Insert Form Variables Into PHP Files & Then ZIP?

    I'm having trouble with PHP, I'm not great with it and have limitations to my abilities

    I have created a form that grabs all the data after the user has submitted it, that was easy enough, I was just doing that to make sure that whatever variables I used would get passed to the second page.

    Now, instead of displaying the variables on a second page I would now like the following to happen:

    test.php

    PHP Code:
    <form id="form1" name="form1" method="post" action="">
      <
    label>Name
      
    <input type="text" name="name" id="name" />
      </
    label>
      <
    p>
        <
    label>Your Website:
        <
    input type="text" name="website" id="website" />
        </
    label>
      </
    p>
      <
    p>
        <
    label>Your Other Website:
        <
    input type="text" name="otherwebsite" id="otherwebsite" />
        </
    label>
      </
    p>
    </
    form
    Now, I would like the following to happen once this data has been submitted:
    name should be inserted into line 444 of test3.php
    website should be inserted into a space on line555 of test4.php
    otherwebsite should be inserted into a space on line666 of test5.php

    Once this has been done the files will be Zipped up and force downloaded to the user, obviously a download prompt would start.

    I am thinking that the easiest way to do this is to have a config.php and for the form to insert these details this way but if the files are being used cross domain will the php includes work?

    Also, is it possible to download the ZIP with a directory layout?

    Such as:
    example.zip

    Inside:
    Folder1
    Folder2

    And to have different files in each folder?

    Thanks a lot

  • #2
    Study this:
    http://us2.php.net/manual/en/book.zip.php

    Comment

    Working...
    X