imported_science_guy
New member
I have created a php script which uses the print function and then uses javascript like this:
print "<script language='JavaScript1.2'>
stuff...
</script>";
And that appeared to work fine, as it has in other scripts. THe strange thing however is that a single variable when changed causes the whole page to redirect to "404 Not Found"
Heres an extract from within the print:
//player stats
var p_b_constitution = $p_b_constitution;
var p_b_skill = $p_b_skill;
var p_b_agility = $p_b_agility;
Now if I remove a single letter from any ONE of the variables:eg. $p__constitution OR $_b_constitution then the code works. But if I delete ONE whole line then it fails. If I rename the variable replacing its name throughout the script its still fails. If I remove characters elsewhere it still fails.
- its not because of a special name of the variable (becuase replacing the varible name fails)
- its not wrong code (because fails if I remove a line)
- its not the function because I put an alert statement above and the code isnt even executed anyway
- its not the number of characters or variables because I removed comments or other lines and still fails
So WHY does that singluar insignificant character matter. and WHY does it cause the page to redirect to 404 Unknown instead of just an error?
Thanks
print "<script language='JavaScript1.2'>
stuff...
</script>";
And that appeared to work fine, as it has in other scripts. THe strange thing however is that a single variable when changed causes the whole page to redirect to "404 Not Found"
Heres an extract from within the print:
//player stats
var p_b_constitution = $p_b_constitution;
var p_b_skill = $p_b_skill;
var p_b_agility = $p_b_agility;
Now if I remove a single letter from any ONE of the variables:eg. $p__constitution OR $_b_constitution then the code works. But if I delete ONE whole line then it fails. If I rename the variable replacing its name throughout the script its still fails. If I remove characters elsewhere it still fails.
- its not because of a special name of the variable (becuase replacing the varible name fails)
- its not wrong code (because fails if I remove a line)
- its not the function because I put an alert statement above and the code isnt even executed anyway
- its not the number of characters or variables because I removed comments or other lines and still fails
So WHY does that singluar insignificant character matter. and WHY does it cause the page to redirect to 404 Unknown instead of just an error?
Thanks