You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 47 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - perpage global returning NULL [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
mjhufford
Nuke Soldier
Nuke Soldier


Joined: Jul 09, 2005
Posts: 16

Location: Lowell, AR

PostPosted: Thu Jul 13, 2006 8:58 am Reply with quoteBack to top

Hi all,

I'm writing a file repository module and having trouble calling the $perpage global.

for example:


Code:
global $perpage;
echo "this is perpage: ".$perpage;


That returns "this is perpage: "

Any ideas? Where is this global stored? Do I need to call another global to get that one to return properly? Thanks!
Find all posts by mjhuffordView user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger
TogetherTeam
Site Admin
Site Admin


Joined: May 28, 2004
Posts: 18


PostPosted: Thu Jul 13, 2006 10:29 am Reply with quoteBack to top

Are you trying to import the global variable from another page ?

Example:

If page1.php store a value in $perpage and you try to get $perpage value in page2.php, but you haven't included page1.php, this is an error.

Correct Example:

- page1.php -

<?
$perpage = 12345;
?>

- page2.php

<?
include("page1.php");
echo "Perpage: ".$perpage;
?>

_BAD_ Example:

- page1.php -

<?
$perpage = 12345;
echo '<a href="page2.php">Page2</a><br />';
?>

- page2.php -
<?
// global $perpage; <- is useless in this case !
echo "Perpage: ".$perpage;
?>

Bye,
Francesco.
Find all posts by TogetherTeamView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.187 Seconds - 171 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::