Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Variable which is created isnt being parsxsed through a include??.
Old 08-26-2007, 12:11 PM Variable which is created isnt being parsxsed through a include??.
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
hi ok, i have a problem on a site im making.

this used to work but i changed something and i have no lcue why its not workign anymore

ok on http://calm.dansgalaxy.co.uk
i have the navigation in a seperate file,

which is below:
PHP Code:
<?
include_once('config.php');
if (
$sitesearch == 1)
{
echo 
'<div style="border: dashed 1px; text-align: center; height: 75px">
<br />
<!-- Google CSE Search Box Begins -->
  <form id="searchbox_005024759402698555062:l3h8qoovxww" action="http://calm.dansgalaxy.co.uk/search.php">
    <input type="hidden" name="cx" value="005024759402698555062:l3h8qoovxww" />
    <input type="hidden" name="cof" value="FORID:11" />
    <input name="q" type="text" size="15" />
    <input type="submit" name="sa" value="Search" />
  </form>
  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_005024759402698555062%3Al3h8qoovxww"></script>
<!-- Google CSE Search Box Ends -->
</div>'
;
}
?>
 
<br />
<ul>
<li><a href="<? echo $core ?>/index.php">Home</a></li>
<li class="sub"><a href="<? echo $core ?>/about.php">About »<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
 <ul>
 <li><a href="<? echo $core ?>/about.php" title="Find out about CALM">About CALM</a></li>
 <li><a href="<? echo $core ?>/about/logo" title="Find out about how CALMs Tortoise came about">About CALM's Logo</a></li>
 <li><a href="<? echo $core ?>/about/website" title="About CALMs website">About CALM's Website</a></li>
 </ul>
 <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="sub"><a href="<? echo $core ?>/events.php">Events »<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
 <ul>
 <li><a href="<? echo $core ?>/events.php" title="Click here to find what exciting events are coming up!">Upcoming Events</a></li>
 <li><a href="<? echo $core ?>/events/newsletters" title="Click here to view/download the lastest and past newsletters">Newsletters</a></li>
 
 </ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="sub"><a href="<? echo $core ?>/info.php">Info... »<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
 <ul>
 <li><a href="<? echo $core ?>/info.php?id=cancer" title="What is Cancer?">What is Cancer</a></li>
 <li><a href="<? echo $core ?>/info.php?id=treatment" title="Find out about treatments">Treatments</a></li>
 <li><a href="<? echo $core ?>/info.php" title=""></a></li>
 </ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="sub"><a href="<? echo $core ?>/contact.php">Feedback »<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
 <ul>
 <li><a href="<? echo $core ?>/feedback/familiesfeedback" title="Click here to find out what the families say">What the families say</a></li>
 <li><a href="<? echo $core ?>/feedback/guestbook" title="Click here to sign CALMs guestbook.">Guestbook</a></li>
 <li><a href="<? echo $core ?>/contact.php" title="Click here to contact us">Contact Us</a></li>
 </ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="sub"><a href="<? echo $core ?>/kids.php">Kids area »<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
 <ul>
 <li><a href="<? echo $core ?>/kids.php" title="Kids home">Kids Home</a></li>
 <li><a href="<? echo $core ?>/kids.php?id=competition" title="Click to find out the latest competition!">Competition</a></li>
 <li><a href="<? echo $core ?>/kids.php?id=games" title="Games Loads of fun flash games.">Games</a></li>
 </ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="sub"><a href="<? echo $core ?>/help.php">How to help »<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
 <ul>
 <li><a href="<? echo $core ?>/help.php" title="Click to find ways you can help CALM">Ways you can help</a></li>
 <li><a href="<? echo $core ?>/help/howtohelp" title="Find great fun ways to sipport calm">Ways to fund raise</a></li>
 <li><a href="<? echo $core ?>/help/donate" title="Find out how you can donate to calm">Donating</a></li>
 </ul>
 <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="sub"><a href="<? echo $core ?>/whatwedo.php">What we do »<!--[if IR 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
    <ul>
 <li><a href="<? echo $core ?>/whatwedo.php" title="What we do">What we do</a></li>
 <li><a href="<? echo $core ?>/whatwedo/family_support" title="How Calm supports it\'s families both emotionally and financially">Families Support</a></li>
 <li><a href="<? echo $core ?>/whatwedo/fundays" title="Days out &amp; social activities">Fun Days</a></li>
 <li><a href="<? echo $core ?>/whatwedo/research" title="Research">Research</a></li>   
 <li><a href="<? echo $core ?>/whatwedo/partners" title="partners">Partners</a></li> 
 </ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li><a href="<? echo $core ?>/help.php?id=donate" title="Donate">Donate</a></li>
<li><a href="<? echo $core ?>/link.php" title="Useful links">Useful links</a></li>
<?
include ('includes/getrank.php');
if (
$Rank >= 7//if they have a rank they must be logged in...
{
echo 
'
<li class="sub"><a href="'
.$core.'/admincp.php">Admin »<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
          <ul>
          <li><a href="'
.$core.'/admincp.php">Admin CP</a></li>
          <li><a href="'
.$core.'/admincp.php?id=gbookadmin">Guestbook</a></li>
          <li><a href="'
.$core.'/admincp.php?id=familystory">Families Story</a></li>
          <li><a href="'
.$core.'/admincp.php?id=addevent">Add Event</a></li>
          <li><a href="'
.$core.'/admincp.php?id=memberlist">Member List</a></li>
          <li><a href="'
.$core.'/admincp.php?id=notes">Notes</a></li>
    <li class="sub"><a href="'
.$core.'/admincp.php?id=settings">Site Settings »<!--[if IE 7]><!--></a><!--<![endif]-->
    
    <!--[if lte IE 6]><table><tr><td><![endif]-->
    <ul>
    <li><a href="'
.$core.'/admincp.php?id=settings&sub=general">General</a></li>
    <li><a href="'
.$core.'/admincp.php?id=settings&sub=footer">Footer Settings</a></li>
    <li><a href="'
.$core.'/admincp.php?id=settings&sub=error">Error Handling</a></li>
    <li><a href="'
.$core.'/admincp.php?id=settings&sub=style">Style</a></li>    
    <li><a href="'
.$core.'/admincp.php?id=phpinfo">PHP info</a></li>
    </ul>
    <!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li>
       </ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li><a href="'
.$core.'/logout.php" title="Logout">Logout</a></li>';
}
//end
?>
</ul>
<br />
<? echo "Rank is $Rank"?>
<div class="curlycontainer">
<div class="innerdiv">
<b>Latest:</b> <br />
<p><? echo $latest_news ?></p>
</div>
</div>
i have inlcuded in that my getrank.php
which is here:
PHP Code:
<?
$user
= ( isset($_GET['user']) ) ? $_GET['user'] : $_SESSION['user']['user'];
$sql="SELECT * FROM users WHERE user='$user' ";
$rank_result=mysql_query($sql) or die ('SQL error :'.mysql_error());
$rankinfo=mysql_fetch_array($rank_result);
$Rank $rankinfo['Rank'];
if(
$_SERVER['PHP_SELF'] == 'getrank.php')
{
echo 
'Rank is '.$Rank;
}
?>
now if i go directly to http://calm.dansgalaxy.co.uk/includes/getrank.php i will see my rank (if im logged in)

and this should as long as the users rank is over 7 (mine is 9) show the admin links.

but it isnt.
and the bit i added which should echo the rank isnt working either.


i just dont get why it isnt working.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
 
Register now for full access!
Reply     « Reply to Variable which is created isnt being parsxsed through a include??.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.08542 seconds with 12 queries