[PHP] Uploading files
Okay, I'm absolutely certain that there's a simple solution to my problem, but my forehead is getting sore from banging it against the wall, so I thought I'd pick y'all's brains. I'm using a form to upload a number of files named $input_form_$i where $i is from 0 to 5 and the following is my code: for ($i = 0; $i=5; $i++){ $l = input_form_$i; $location = $$l; move_uploaded_file($location, $upload_path/$location_name); } with that, I get the following warnings: Warning: Unable to create '/': Invalid argument in [php file running program] on line 64 Warning: Unable to move '/var/tmp//php9Uai9S' to '/' in [php file running program] on line 64 /var/tmp//php9Uai9S not loadable Funny thing is another page that doesn't use the $$l method to dynamically grab variable names (just uses a static variable name) works totally fine with essentially the same code. FYI: The form type is multipart/form-data and the input fields are set to file so I have no idea what's going wrong. Any thoughts? David Castillo Application Systems Analyst Human Resources Department Northern Arizona University [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] fdf and pfd functions in PHP
Okay, I'm trying to teach myself how to utilize fdf and insert into pdf and I have a question for y'all. When using pfd forms to submit to an fdf file, the php script uses the variable $HTTP_RAW_POST_DATA as the source to write to the fdf file. If I use an HTML form to do the same thing, what variable would I use? I tried $HTTP_POST_DATA and it returned an empty variable set resulting in an empty fdf file. The code I'm using is as follows: ?php $fdffp = fopen(test.fdf,w); fwrite($fdffp, $HTTP_POST_DATA, strlen($HTTP_POST_DATA)); fclose($fdffp); ? Sorry for the basic question but I guess we all have to start somewhere! Cheers, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]