Seesions

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
sandy1028
Forum Commoner
Posts: 60
Joined: Thu Jul 26, 2007 3:56 am

Seesions

Post by sandy1028 »

feyd | 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 to use same sessions for the graphs.

But when I use as below the values of xpoint is same for both the graphs.

The graph values differ.

How to use the sessions to get the different values for two graphs.

Code: Select all

echo "<div style=\"position:absolute; left:100; top:468;\"><img src=\"radar.php?v1=$val[0]&v2=$val[1]". "&v3=$val[2]&v4=$val[3]&v5=$val[4]&v6=$val[5]&v7=$val[6]&v8=$val[7]\" border=0 usemap=\"#radar\"></div>";
session_start();
$xpoint = explode("%",$_SESSION["cx"]);
session_destroy();

    $val       = RadarGraph($dbyesdate);
    array_shift($val);
    echo "<div style=\"position:absolute; left:642; top:468;\"><img src=\"radar.php?v1=$val[0]&v2=$val[1]&v3=$val[2]". "&v4=$val[3]&v5=$val[4]&v6=$val[5]&v7=$val[6]&v8=$val[7]\" border =0 usemap=\"#radar\"></div>";
session_start();
$xpoint = explode("%",$_SESSION["cx"]);
session_destroy();


 echo "<map name=\"radar\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[0],4\" href=\"#\" title=\"N - $val[1]\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[1],4\" href=\"#\" title=\"C - $val[2]\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[2],4\" href=\"#\" title=\"M - $val[3]\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[3],4\" href=\"#\" title=\"N - $val[4]\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[4],4\" href=\"#\" title=\"R - $val[5]\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[5],4\" href=\"#\" title=\"A - $val[6]\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[6],4\" href=\"#\" title=\"G - $val[7]\">";
        echo "<area shape=\"circle\" coords=\"$xpoint[7],4\" href=\"#\" title=\"B - $val[0]\">";
echo "</map>";

feyd | 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]
Post Reply