unknown1 Posted September 7, 2009 Share Posted September 7, 2009 I have a script that I created... and it has a database with user information. I have created a query that selects the users URL's from the database in an array... the variable for the user URL's is $row['Ur'l]; I want to use the Alexa Graph Widget from http://www.alexa.com/siteowners/widgets/graph in the code they have used a variable for user site as $sitename = [' '] but the issue is my content is dynamic so the URL doesn't become static till after the php is complete.... I tried to use $sitename = $row['Url']; as the site value but it didn't work. Can anyone tell me how I can use this widget and have the $sitename value be dynamic. Thanks!! <script type="text/javascript">/* <![CDATA[*/ $sitename = ['']; // USER-EDITABLE VARIABLES // enter up to 3 domains, separated by a space var sites = ['<? echo"$sitename"; ?>']; var opts = { width: 380, // width in pixels (max 400) height: 300, // height in pixels (max 300) type: 'r', // "r" Reach, "n" Rank, "p" Page Views range: '3m', // "7d", "1m", "3m", "6m", "1y", "3y", "5y", "max" bgcolor: 'e6f3fc' // hex value without "#" char (usually "e6f3fc") }; // END USER-EDITABLE VARIABLES AGraphManager.add( new AGraph(sites, opts) ); //]]></script> Link to comment https://forums.phpfreaks.com/topic/173366-help/ Share on other sites More sharing options...
unknown1 Posted September 7, 2009 Author Share Posted September 7, 2009 Is this even possible?? Link to comment https://forums.phpfreaks.com/topic/173366-help/#findComment-914268 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.