Georgie,
I'm not sure what you're wanting to do here, but it looks like you just
want to use PHP to write some javascript. There's no need to make the
browser request an additional page for this. Just do something like this
in your PHP script:
<script language="javascript">
<?
PHP stuff here - output is valid javascript
?>
</script>
or even:
<script language="javascript">
<?
include("/home/georgie/top_stuff.php");
?>
</script>
However, speaking directly to your problem, see what you see when you
access that URL (http://localhost/top_stuff.php?affiliate=1) yourself.
If your PHP scripts are not being processed and instead are just
displayed in the browser, then your Web server is not configured to
process PHP.
Happy hacking.
Chris
Georgie Casey wrote:
>In HTML, you can do this:
><script language="JavaScript"
>src="http://localhost/top_stuff.php?affiliate=1"></script>
>
>But the script isn't executed before being used by the browser, it's
>returned with PHP tags and all, which obviously gives JS errors. Is there
>any setting you can change in Apache that let's you do this.
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php