Hi,
When requiring files, the required files usually have a [i]if(!defined(‘FOO’))
Anyway, lately I’ve been trying out the new web-hype, Ajax. I’ve managed to create a script that updates a news item without having to reload the page. The thing is, I’m accessing this ‘edit.php’ file to make the database changes, but the ‘define’ method as mentioned won’t work. When I define a variable in the first file and then use the XMLHTTPRequest to access another file, the accessed file won’t find the variable defined. Using POST or GET to check for validity also isn’t an option since everyone can see the Javascript files.
So, how are you supposed to know your files are being accessed with XMLHTTPRequest, and thus giving it access?
Thanks.