Is this correct for re-directing users:
fopen ( "http://localhost/jotr/comp_lgn_error.html", "r" );
No. This is: header("Location: http://localhost/jotr/comp_lgn_error.html");