Hmmm, I don't think this is what I am after. The script definitely
runs -on the server- without a problem. I can see the entries in my database.
Besides, my counter script works like this like a charm for all my
other webpages as well. I cannot imagine I need Javascript really to get a
PHP output string back in my browser. I don't want to use J(ava)script
anyway, as I cannot be sure all clients have it enabled.
Thanks for your thoughts though! Any other ideas ?
Pjotr:
I expressed this badly. Using <script> in the <body> defines
client-side script. Yes, your script is called and executed on the
server, but whatever text is returned from the script is executed in
the browser using the script engine specified. Most browsers do not
have a PHP engine available.
This is the main reason why most tracker applications use an embedded
image file rather than a script. As you say, not all clients will have
javascript or will always enable it if they have it. Most clients will
respond to an <img> tag (hmmm, would Lynx fetch anything?)
An alternative if you wish to avoid javascript is to have your PHP
script return an image and call it using <img
src="http://www.myserver.com/myscript.php">, making sure of course that
you set the MIME type accordingly. Search comp.lang.php for many
previous threads on this topic.
---
Steve