5, September 2008

user photo upload with a few details - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: user photo upload with a few details
« previous next »
Pages: [1] Print

Author Topic: user photo upload with a few details  (Read 1646 times)
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« on: Aug 28, 2006, 06:39:11 AM »

do you have a php script where details of a form and an uploaded photo will be stored somewhere in my server awaiting moderation?

so far i came up with this for my site:

http://filipina.freehostia.com/gallery/join/ Visit through proxy

as you can see, since i dont know anything about php, i just made 2 pages for 2 scripts, one will receive the inputs of the form and another upload the photo into my server. can you give me a script which can do it in 1 step?
« Last Edit: Aug 28, 2006, 07:01:29 AM by vbignacio »


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Aug 28, 2006, 09:41:03 AM »

Yes you can, check the the example "upload_db_example.php", this file doesn't use a database at the moment but it will five you an idea how to do it.
First you need to upload the file and on success insert the data to a database.
To get this "moderating" feature you need am extra value in the database like show = "y"
this value is the indicator if a photo will show up or not inside the gallery.


Last blog : Is your website is down? Know before your visitors do!
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #2 on: Aug 28, 2006, 12:26:07 PM »

thanks.

where can i find this "upload_db_example.php" script? with the Easy PHP Upload ver. 2.31 in your site?


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Aug 28, 2006, 12:48:20 PM »

thanks.

where can i find this "upload_db_example.php" script? with the Easy PHP Upload ver. 2.31 in your site?
it's within the zip file...


Last blog : Is your website is down? Know before your visitors do!
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #4 on: Aug 29, 2006, 06:16:06 AM »

found it. thanks!


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Aug 29, 2006, 08:10:29 AM »

found it. thanks!
OK don't forget to open a new thread if you need assistance for the upload class


Last blog : Is your website is down? Know before your visitors do!
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #6 on: Sep 03, 2006, 01:07:32 AM »

my concern with file uploads is when script kiddies send you a virus disguised as a jpg or gif file. my server could be vulnerable to attacks.

so to address it i decided to use FormMail. its a free php script that sends the content of your user submitted form to your email account. i configured the script to send it to my yahoo email. yahoo mail has built-in virus scanning and a thumbnail preview of the photos attached so i will know outright if it is a real photo or just a virus in disguise before i open it.

my problem is solved!


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Sep 03, 2006, 10:20:48 AM »

Quote
my concern with file uploads is when script kiddies send you a virus disguised as a jpg or gif file. my server could be vulnerable to attacks.
never heard about this, this way it should be dangerous for millions of websites. If you upload a file to send it by mail the same risk exists because the file is uploaded first...


Last blog : Is your website is down? Know before your visitors do!
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8037
41179 credits
Members referred : 3



« Reply #8 on: Sep 03, 2006, 12:23:42 PM »

Off topic: Should we move that thread to the Olaf's forums?

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Sep 03, 2006, 12:41:36 PM »

Off topic: Should we move that thread to the Olaf's forums?
not yet since he is not using the uplaod class Wink


Last blog : Is your website is down? Know before your visitors do!
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #10 on: Sep 04, 2006, 04:14:58 AM »

no, the file is not uploaded first since i configured the script not to. it just emails me the file.

and ive encountered a virus which disguises itself into any file by adding another filename after its own like this: virusname.virusfile.jpg but i cant remember the name of that virus, only that it caught me offguard and infected my pc.

yes, it is possible. and sending the file to my yahoo email first will provide the needed virus scanning.


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #11 on: Sep 04, 2006, 09:11:03 AM »

Quote
no, the file is not uploaded first since i configured the script not to. it just emails me the file.

than you missunderstand something, a file selected with a file formelement is always uploaded first and processed adterwards...

uploading a file will not say that the file is stored on the server, but anyway if you feel save with your solution go for it (never got a virus with by and uploaded file) Smiley
« Last Edit: Sep 04, 2006, 09:12:34 AM by olaf »


Last blog : Is your website is down? Know before your visitors do!
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #12 on: Sep 04, 2006, 12:52:04 PM »

"a file selected with a file formelement is always uploaded first and processed adterwards..."

oh ok. as long as i dont have to open it from there just to feel safe.


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #13 on: Sep 04, 2006, 01:16:16 PM »

"a file selected with a file formelement is always uploaded first and processed adterwards..."

oh ok. as long as i dont have to open it from there just to feel safe.

hehe, al actions on the client side has to be verified by the user...

by the way the most viruses wouldn't harm a linux webserver


Last blog : Is your website is down? Know before your visitors do!
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #14 on: Sep 05, 2006, 01:46:01 AM »

"hehe, al actions on the client side has to be verified by the user..."

what i meant was, if i want to see what was uploaded on my server, then i have to view it on my computer, right? if it was a virus in disguise, how would i know?

if i click on a virus disguised as a picture file, then i have already downloaded it in my computer too.


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #15 on: Sep 05, 2006, 01:54:38 AM »

"hehe, al actions on the client side has to be verified by the user..."

what i meant was, if i want to see what was uploaded on my server, then i have to view it on my computer, right? if it was a virus in disguise, how would i know?

if i click on a virus disguised as a picture file, then i have already downloaded it in my computer too.

in this case you should virusscan the files first Wink (never had a virus since I own a PC)


Last blog : Is your website is down? Know before your visitors do!
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #16 on: Sep 05, 2006, 08:52:43 AM »

thats where yahoo mail comes in. all form submissions will be sent to my yahoo email since they have virus scanning and displays a thumbnail of the photos sent to me.


Last blog : Liloan Beach, Cebu, Philippines
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #17 on: Sep 05, 2006, 09:46:04 AM »

thats where yahoo mail comes in. all form submissions will be sent to my yahoo email since they have virus scanning and displays a thumbnail of the photos sent to me.
yes gmail too...


Last blog : Is your website is down? Know before your visitors do!
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3858
Tags : php yahoo databases linux email Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: user photo upload with a few details
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Sep 05, 2008, 06:41:44 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 36.294
Total Topics: 7.477
Total Members: 3.899
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: speedy5044

26 Guests, 5 Users online :

13 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.