Results 1 to 3 of 3
Nov 5, 2011, 15:03 #1
- Join Date
- Jun 2009
- 0 Post(s)
- 0 Thread(s)
PHP in External JS file (driving me crazy!)
I read several examples, tried them all out - and nothing works! Driving me crazy - completely insane! Maybe you guys can help
My problem is simple:
file B.html includes this line:
(some js code) var user_id = <?php $a=100; $b=200; $c=$a+$b; echo($c);?>; alert("Your user ID is:" + user_id); (some more js code)
Doesn't work. Renaming B.js to B.php did nothing.
What am I doing wrong?