CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [Resolved] $Tpl variable inside <script>

Print topic Send  topic

Author Message
zecinho

Posts: 24
Posted: 03/06/2010, 5:30 AM

I am tryn to use dynamic google maps key over multidomain site. This is my code

   
global $Tpl; 	  
global $DBdb; 	 	  
$db = new clsDBdb();       
$SQL = "SELECT GoogleMapKey FROM empresas WHERE Url='". $_SERVER['HTTP_HOST'] ."'";     $db->query($SQL);       
$Result = $db->next_record();       
if ($Result) { 		  
$Tpl->SetVar("GoogleMapKey", $db->f("GoogleMapKey")); 	}     	  
$db->close();   	}   

An the variable result I put on

 <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2.89&key={GoogleMapKey}"></script>

This results on black page with no content. Something I missing? $Tpl works fine when I use inside html tags.
_________________
Jose Maldonado
View profile  Send private message
zecinho

Posts: 24
Posted: 03/06/2010, 5:46 AM

Solved. my code was wrong wtih a "}" unnecesary
_________________
Jose Maldonado
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.