<script language=\"javascript\"> Strange Dis

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bluesapphire
Forum Newbie
Posts: 2
Joined: Thu Apr 20, 2006 8:22 am

<script language=\"javascript\"> Strange Dis

Post by bluesapphire »

Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi!
I have got following code from the source of the page.
[syntax="javascript"]
/************/
<script language="javascript">
var myuid = 12.325;
var uri = 'http://impgb.tradedoubler.com/imp/img/16173558/1014659?' + new String (Math.random()).substring (2, 11);
document.write('<a href=\"http://clkuk.tradedoubler.com/click?p=37983&a=1014659&g=16173558&epi=\"'+myuid+'\" target=\"_blank\"><img src=\"'+uri+'\" border=0></a>');
</script>
/***********/
The value of myuid is not replaced and if i take cursor on the link then there is no value of epi is shown. One more thing, I am using a variable $_SESSION['UID'] .How can I assign value of $_SESSION['UID'] to epi in this code.

Kind Regards


Weirdan | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: <script language=\"javascript\"> Strange

Post by RobertGonzalez »

Code: Select all

/************/
<script language="javascript">
var myuid = <?php echo $_SESSION['UID']; ?>;
var uri = 'http://impgb.tradedoubler.com/imp/img/16173558/1014659?' + new String (Math.random()).substring (2, 11);
document.write('<a href=\"http://clkuk.tradedoubler.com/click?p=37983&a=1014659&g=16173558&epi=\"'+myuid+'\" target=\"_blank\"><img src=\"'+uri+'\" border=0></a>');
</script>
/***********/
Post Reply