Are you positive fileupload.php is passing $userfile to the mail() script? A blank result would seem to indicate that it's not getting passed. You could try passing it through the URL if they're seperate scripts. Or, you could just include the mail() script in fileupload.php, eliminating the need to create a global variable.
Cheers, db Brian Tegtmeier wrote: > Ok here is my story. I have this PHP script that uses a file system and when a >person comes to one of my pages, they click the Browse button, click Submit, and get >redirected to another page after they have gotten validated for uploading a JPG or >Word document. > > Here is my thing.. I have it setup so when a person submits it and gets redirected, >it automatically sends me an email with their IP address and so on. > > For reference, on my Upload page I have this for my form information where I have >userfile as the PHP function I will be using in the fileupload.php page: > > <form method="post" action="fileupload.php" enctype="multipart/form-data"> > <input type="hidden" name="MAX_FILE_SIZE" value="100000"> > <p><input type="file" name="userfile" value="Browse"></p> > <p><input type="submit" value="Submit" name="Submit"></form> > > After that gets run and runs the following PHP script, it adds the image to the >/upload/ folder and sends me an email. My big problem is in the actual email is >having the name of the $userfile show up in the email. > > For example, I have global $userfile near the top of my script and for my email, I >have a $message command that gets outputed in the recievers email. > > For one of my $message variables, I have this which of course I currently have >$userfile in the script: > > $message .= "The URL of the new file is: \n$docroot/files/$userfile\n\n"; > > But even with this, the end of the URL of the email shows up blank (ex: >www.mysite.com/files/) leaving me in the dust by not including the filename like >01.jpg. Of course, my ideal email would have the output say like >www.mysite.com/files01.jpg. > > Does any of you know of any solutions to this? I can send source if needed. > > Thanks! > > -- > > _______________________________________________ > Sign-up for your own FREE Personalized E-mail at Mail.com > http://www.mail.com/?sr=signup > > 1 cent a minute calls anywhere in the U.S.! > > >http://www.getpennytalk.com/cgi-bin/adforward.cgi?p_key=RG9853KJ&url=http://www.getpennytalk.com > > -- > PHP Database 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] -- ---------- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database 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]