Upload script
Posted: Mon Sep 01, 2008 6:25 am
Hi guys!
I am new both on forum and on php. I have created a website (an index page on html and an upload script on php). A user can select a file and then if he press the submit button, his file is uploaded in a folder. But many of my friends have asked me to give an embed code and a url of the file they have uploaded under the file (eg if he visit http://www.mysite.com/uploads/image1 they want to give them the embed code <img src="http://mysite.com/uploads/image1"> and the url http://www.mysite.com/uploads/image1 ). But only if it is an image. If it is a zipped file or a sound i want to show an icon, an embed code and a url. How can i do that? If you cannot give me a code please give me an idea, i'll try to create it on my own.
Ragards
PS
sorry for my bad english
I am new both on forum and on php. I have created a website (an index page on html and an upload script on php). A user can select a file and then if he press the submit button, his file is uploaded in a folder. But many of my friends have asked me to give an embed code and a url of the file they have uploaded under the file (eg if he visit http://www.mysite.com/uploads/image1 they want to give them the embed code <img src="http://mysite.com/uploads/image1"> and the url http://www.mysite.com/uploads/image1 ). But only if it is an image. If it is a zipped file or a sound i want to show an icon, an embed code and a url. How can i do that? If you cannot give me a code please give me an idea, i'll try to create it on my own.
Ragards
PS
sorry for my bad english