On my homepage .. index.php .. right up the top I define a constant to use in other php files, I'm trying to ensure that index has been loaded and the php files aren't accessed directly. I use ..
define('SOME_CONSTANT','something'); - index.php
There's a sign up form on index.php that sends the data to /php/signuphandle.php .. In signuphandle.php I have a check
if(!defined('CONSTANT_NAME')){ echo('nope'); }
The issue is it always hits the !defined block and echos "nope" .. I can't figure out why? I've looked up the documentation and lots of previous posts on this form to no avail. Am I just doing it wrong? Thanks for any help you guys can give.