Running Javascript on a PHP Landing Page?

gamingneeds

New member
Jul 1, 2009
169
1
0
I'm using a PHP landing page instead of HTML and the Prosper landing page tracking script is in Javascript only.

How do I embed this into my PHP lander?

Here is the script:

Code:
<script src="http://www.mydomain.com/tracking202/static/landing.php?lpip=1234" type="text/javascript"></script>

Thanks for your help.
 


I'm using a PHP landing page instead of HTML and the Prosper landing page tracking script is in Javascript only.

Repeat after me, "PHP... is not... a... markup language. It's a... server side processing language."

The web server processes all PHP instructions prior to being sent from the server to the client's browser. When the server sends packets of information to the browser, it sends HTML, Javascript, etc., not PHP. This occurs after all PHP statements have been processed.

If you haven't figured it out yet: PHP and HTML coexist, it's not one or the other.

So, put your PHP statements at the top or bottom of your file, hell, put them inside the HTML. It doesn't matter. All the .php file extension does is tell the web server to be looking for PHP statements to process. You don't even have to have PHP statements in the file, you could write Javascript, CSS, HTML, etc. in there and it wouldn't make a difference for what shows up to the client's browser.

That's why this:
Code:
<p><?php echo 'This is HTML text.'; ?></p>
Will show up as
Code:
<p>This is HTML text.</p>

In the client's browser.

I strongly suggest you look at some tutorials on w3schools.com.
 
I never claimed that you tard.

I just asked how to put it inside the PHP script...

It's what you implied since the first 2-3 sentences in any Introduction to PHP tutorial would leave you understanding why your OP was filled with "Oh, can't be bothered to take the time to Google this, please do it for me.".

i.e.: PHP Introduction

Oh look: PHP Syntax

^^ Full example to give you what you're after.

Don't call the people who take time out of their day to help you, even if it's a harder explanation than what you're expecting, retarded. You get responded to based on the effort you put in.