passing php variables doesn't work with file upload

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jbkosman
Forum Newbie
Posts: 2
Joined: Mon Jun 03, 2002 5:21 am

passing php variables doesn't work with file upload

Post by jbkosman »

Hi there:

I read the warnings for php 4.2. I have 4.1.2 installed on a linux box, with register_globals turned on. This is the "production" box. The comp I actually code on is a windows machine with an older version.

The problem is this.

I have an upload script that allows a user to upload an image. Along with the upload script, I'm passing a variable along with the upload since I need to have a link between all files that are loaded by one user (and which is stored in a database along with the filename).

for some reason this all works well on my windows machine. however when i run it on the linux box it doesn't. it seems that the image is being uploaded, however no variables are being sent. how i know this is because the script generates an error when the session id doesn't exist (which it doesn't because it isn't sent).

the form tag in the html is:

<form action="/actions/uploadImg.php" name="form" enctype="multipart/form-data" method="post">

any ideas what the problem is? like i said, the register_globals is turned on so i don't know what else it could be. besides, all the other forms (which don't use the multipart/form-data enctype) on the site work.

anyway, any help would be appreciated.

thanks. jb[/url]
Post Reply