Re: <script> tag problem in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ahmad wrote:
> Hi!
>        If I use following url it works fine and replaces  values of my $_SESSION variables 
>    
>   "http://pf.tradedoubler.com/pf/pf2?a=913664&cuid=88215&tid=4997&epi=<?php echo $_SESSION[UID].'-'.$_SESSION[USERNAME];?>&oe=ISO-8859-1&js=true" charset="ISO-8859-1"
>    
>   But if I use in the following manner then it displays as it is and doesn,t replace the values with variables.
>    
>   <script language="JavaScript" src="http://pf.tradedoubler.com/pf/pf2?a=913664&cuid=88215&tid=4997&epi=<?php echo $_SESSION[UID].'-'.$_SESSION[USERNAME];?>&oe=ISO-8859-1&js=true" charset="ISO-8859-1" charset="ISO-8859-1"></script>   
>    
>    
>   Thanks in advance
>
>   
you need to echo out the script like this:

echo "<script type=\"text/javascript\" 
src=\"http://pf.tradedoubler.com/pf/pf2?a=913664&amp;cuid=88215&amp;tid=4997&amp;epi="; 
. $_SESSION[UID] ."-". 
$_SESSION[USERNAME]."&amp;oe=ISO-8859-1&amp;js=true\" 
charset=\"ISO-8859-1\"></script> ";
 


PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux