Re: Help with mail notifying via file upload

From: Date: Sat, 01 Dec 2001 02:23:13 +0000
Subject: Re: Help with mail notifying via file upload
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14730@lists.php.net to get a copy of this message
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: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- ---------- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org dbarton@prbo.org dbarton@grayflycatcher.org

« previous php.db (#14730) next »