Jump to content

help!!


unknown1

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.