Upload check to retain existing file
Question:
Is there a variable that shows if a new file has been entered and I can test against it? Answer:
DISCLAIMER:
This is extra complimentary content which purpose is to show additional usage that is not part of the product, i.e. it suggests tips for extending the functionality of the product by the users themselves. It is provided "as is", without warranty of any kind, express or implied , including but not limited to the warranties of merchantability, fitness for a particular purpose and nonfringement of third party rights.
DMXzone does not take responsibility to support the suggested content to be fully compatible and working as intended and does not provide support for extended functionality which is not included in the current release of the extension.
It is highly recommended that only more advanced developers use it.
Is there a variable that shows if a new file has been entered and I can test against it? Answer:
In PHP the arrays $_FILES contain the information for all uploaded files. Please try the following code in order to check if a new file has been entered and I can test against it:
<?php
if(isset($_FILES['imagename0']) && ($_FILES['imagename0']['size'] > 0))
{
$DIfileUpload1 = $_FILES['imagename0']['name']; }
else
{
//Set $DIfileUpload1 with something else
$DIfileUpload1 = 'undefine';
}
?>
DISCLAIMER:
This is extra complimentary content which purpose is to show additional usage that is not part of the product, i.e. it suggests tips for extending the functionality of the product by the users themselves. It is provided "as is", without warranty of any kind, express or implied , including but not limited to the warranties of merchantability, fitness for a particular purpose and nonfringement of third party rights.
DMXzone does not take responsibility to support the suggested content to be fully compatible and working as intended and does not provide support for extended functionality which is not included in the current release of the extension.
It is highly recommended that only more advanced developers use it.
Comments
Be the first to write a comment
You must me logged in to write a comment.