PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Firstly, you need exit; calls after your header call.
Secondly, var_dump($_POST['submitted']); and var_dump($_POST['gallery']); to see if the values you are expecting are getting across.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.