MyBB Community Forums

Full Version: Forcing a field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a code for contact form.
It has a field for attach images. I want to Force users for send an image.
How can I do it?

I attached the code.
[sorry for my bad English Big Grin  ]
Check if it's empty (replace myField to whatever you field name is)

if (empty($_POST['myField']))
    die('Do not leave the field empty.');