Page 1 of 1

problem of validation in form

Posted: Sat Oct 15, 2011 12:08 pm
by shinstar
can any one tell me how can i validate this line if i use it in form to upload file,

Code: Select all

<input type="file" name="images[]" class="wwIconified" value="upload"/><br />
i want the validation above code like in php but i dont understand ho can i do it

Code: Select all

if ( !upload )

{
error ="You must upload picture file";
}
i just want that user must upload a file that is been specified my me e.g in .jpg , .png format...

Re: problem of validation in form

Posted: Sat Oct 15, 2011 12:42 pm
by Celauran

Code: Select all

if (!isset($_FILES['images']))
{
    // whatever
}