Page 1 of 1

Authorization to Upload image

Posted: Sat Dec 06, 2003 3:03 am
by inor.y
I'm a newbie in PHP and still learning.

I have a problem in uploading image to the website. I have an admin username and password to access the website, but I do not know how to use it to allow uploading image to the website. I tried the code in virtual server as localhost on my computer. It works but when I upload the code to the server, it gives an error.

Can somebody out there help me.

It's been days trying to research on the problem, and I give up.

Posted: Sat Dec 06, 2003 6:41 pm
by DuFF
What kind of login system do you have? .htaccess, sessions or cookies?

For help with file or image uploading check out the php.net manual:
http://www.php.net/manual/en/features.file-upload.php

Authorisation on File Upload

Posted: Fri Dec 12, 2003 9:47 am
by inor.y
Duff,
Sorry but I was out of town I just got in and read ur reply. Thanks for ur time. Right now I dont use authentication but on my other projects I used a database to authenticate users using forms plus a cookie to monitor access.

I read that .htaccess provides read/write access to a directory on the web server. But I dont know how to edit nor access the file.

The web site contains product pics and it has to be uploaded in a directory on the web server. I made an admin page to upload the pics, but it requires that I have write access to the directory. If i use .htacess it would allow the directory to be seen and uploaded by anybody. How do I go about this problem. I have a probable solution to convert all my pics to binary and store in the database, but I may have to re-program a lot of pages.

If I can only code something that I embed the admin access to the site upon authenticated that the login is authorized, probably I can send this command to the server so I can write on the directory. I am creating an on-line store where I create my own shopping cart. Actually this is just one of my problem. The other is I dont know how to do an IPN test on the checkout routine. Maybe somebody can help me out.

It would be highly appreciated if I can upload the web site before Christmas.

Thanks for ur help. More power to this site.