Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
thundarfoot
Regular
Regular


Joined: Jan 16, 2008
Posts: 75

PostPosted: Sun Feb 03, 2008 7:32 pm Reply with quote

I am a noob, there thats out of the way.....
I am working on my first module, I am trying to make a second page in mymodules directory.

I can call the second page like this, but I need to pass a variable in the url Only registered users can see links on this board! Get registered or login! file=secondpage

I have included the code from my script that assigns the variable. when I made the script in php I could pass the variable by calling
Only registered users can see links on this board! Get registered or login! (or whatever number)
but not sure how to do it with nuke....just a syntax problem I hope.
anyway here is the code


Code:
<?php 


require_once('mainfile.php');
require_once('../localhost/Connections/LWC.php');
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = '- My Module Name';
include_once 'header.php';
OpenTable();

<?php
  if (isset($_GET['cn'])) {
    $cn = $_GET['cn'];
  }
?>
 
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sun Feb 03, 2008 8:01 pm Reply with quote

Your URL to your second page would be

modules.php?name=mymodule&file=secondpage&cn=5

You then retrieve cn from $_GET in your secondpage.php file.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
thundarfoot
PostPosted: Sun Feb 03, 2008 8:29 pm Reply with quote

cool I kept trying to use a ? instead of &
thanks again
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©