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

or even:

<script language="javascript">

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.


Georgie Casey wrote:

>In HTML, you can do this:
><script language="JavaScript"
>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 (
To unsubscribe, visit:

Reply via email to