Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How To Display Stored Image Using Path? Reply To: How To Display Stored Image Using Path?

#164335
__
Participant

I’m having the same problem with the form i.e. I can upload an image without any date in the form fields.

I don’t see any input element for a date.

I don’t think the php is the issue?

I don’t know. Your example does not show the PHP code that processes the form.

If a date is required, then just make sure that one is provided before accepting the image. Something like:

<?php
if(
    isset( $_POST["your-date-field"] ) 
    && strtotime( $_POST["your-date-field"] ) !== false
){
    /* valid date submitted */
}
else{
    /* no valid date submitted */
}