Hi there.
I'm a total PHP newbie after some advice please...
I've customised part of a commercial PHP script that I bought to create a Job Listing website.
The script provides a contact form that calls a function which sends information by email. I've added to this script so that the sender can upload a Resume and send this as well.
I'd just like someone who knows a bit more PHP than me to check that I'm not at any kind of security risk with this please:
I've added this to the existing form in the TPL file:
enctype="multipart/form-data"
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input name="userfile" type="file" />
I then pass these additional items to the email function call in the PHP file:
$_FILES['userfile']['tmp_name']
$_FILES['userfile']['name']
These give the attachment location and name respectively.
Presumably because the file stays temporary it's automatically deleted after use?
Anything to worry about?
Thanks guys.
I'm a total PHP newbie after some advice please...
I've customised part of a commercial PHP script that I bought to create a Job Listing website.
The script provides a contact form that calls a function which sends information by email. I've added to this script so that the sender can upload a Resume and send this as well.
I'd just like someone who knows a bit more PHP than me to check that I'm not at any kind of security risk with this please:
I've added this to the existing form in the TPL file:
enctype="multipart/form-data"
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input name="userfile" type="file" />
I then pass these additional items to the email function call in the PHP file:
$_FILES['userfile']['tmp_name']
$_FILES['userfile']['name']
These give the attachment location and name respectively.
Presumably because the file stays temporary it's automatically deleted after use?
Anything to worry about?
Thanks guys.