PHOTO UPLOADING SCRIPT (ALLOWING VISITORS TO MY SITE TO UPLOAD IMAGES)?

Question by parlanchina:
Photo uploading script (allowing visitors to my site to upload images)?
I want to put a pic uploading script on my website that will grant visitors to my site to upload their pics to my site. do you know any script or program that can do that?
——————————————
Answer by Politically Correct
You can do this with php but you might want to make your users log in first or anticipate a lot of junk and malware to make its way onto the server.
Depending on your host, they might not even let you have a 777 folder (full permissions to everyone) to store this stuff.
——————————————
Know better? Leave your own answer in the comments!









about 1 year ago
What are you trying to use this.src for? this.src only works for images (img src=…).
You can implement JavaScript in the head and use functions with “this”.
Outside the function area you can also use “this” but it would usually refer to the document unless “this” was defined beforehand.
about 1 year ago
I don’t think that there is any relationship between the JS keyword “this” and the DOM. You use “this” to refer to the current object.
about 1 year ago
“This” refers to the object for which its contained, this can include an event, in which case “this” refers to the event object. First you must add a listener to an object, or you could say “attach an event”. See the below code
//
// document.getElementById is used to assign the element
// by ID
function doLoad()
{
// the below code has been modified by Yahoo!
// it should read “document dot getlementbyid (‘myLink’) dot
// onclick = funcRef;”
document.getElementById(“myLink”).onclick = funcRef;
}
function funcRef()
{
// this will now refer to the element associated to the event
this.style.color = “red”;
}
// its important to note that you cannot assign an element
// using document.getElementById until the page has fully
// rendered. So, we will attach doLoad to the onload event
window.onload = doLoad;
// all of the above code should reside in the head
// the code below should reside in the body
i turn red
//
Hope this helps
about 3 months ago
Code:
< ?
/***************************
index.php
***************************/
require_once('files.class.php');
$ UserInput = array();
foreach($ _POST as $ key => $ value){
$ UserInput[$ key] = $ value;
}
$ files = new files;
$ files->validate_file($ UserInput);
?>