PDA

View Full Version : PHP & Forms



gopher_yarrowzoo
08-04-2004, 06:06 PM
Okay not sure if this is right place (if it's not can some nice forum admin please move this ta)
I got a form I've set it up so that all the data should be loaded into an array (I've read the PHP manual section on this.. now what it don't tell ya is how the heck to get the data out of the array when you submit the form...
any ideas?
Reason I wanna do it is I got me an apache server running, found a php "zip" class file and I'm hoping to be able to use it in some way to "zip" up the file list that is contained in the form data even if it's just 1% compression and then let the user download that 1 single file instead of like 10 - 15 files... it's a small collection of mp3's I have it's so I can access them anywhere but sometimes I might wanna download a whole load at once...
Any hint, tips, web forums
I'll try and find the link to the page where I got the zip class from and if ya ask me nice enough I may just send you the link to what it looks like (without the submit buton)

Darkness Productions
08-05-2004, 08:20 AM
So you've got an HTML form that posts to a PHP page on your server?

If that's the case, then what you want is something like:



foreach ($_POST as $posted) {
print $_POST[$posted]." - $posted<br />\n";
}


That should get you everything that was POSTed to the server. THis code is untested, but should work with minor modifications if necessary.