PHP files can be anywhere.
I take it you have a folder named php.
then you need a path. (same directory)
./php/indexthanks.php#subscribe
or (go up 1 directory)
../php/indexthanks.php#subscribe
BTW these are relative paths
absolute path from poot would be
/php/indexthanks.php#subscribe
best way to debug is to look at the URL, where are you?