parameter passing issue on function


Posted on 16th Feb 2014 07:03 pm by admin

Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which where really function calls.


Here is a few lines that make up the menu
Did you know?Explore Trending and Topic pages for more stories like this.
Code: [Select]<li><a Href="?page=welcome_page">Home</a></li>
<li><a Href="?page=laninfo_display">Party Info</a></li>

This function loads other functions into the main body of the web page.
Code: [Select]function main_page(){
if ( $_GET['page'] == null ) {
$menu_link = welcome_page;
$menu_link();
}else{
$menu_link = $_GET['page'];
$menu_link();
}
}

All was good till recently I needed to start passing parameters back and forth between some functions. What would be the best way to solve this issue?
No comments posted yet

Your Answer:

Login to answer
66 Like 39 Dislike
Previous forums Next forums
Other forums

listing help
Hi,

at first, great new design!!! I like it,

i got a problem,

I want to list so

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

How to show next and prev records
Hi all,

Sorry if this is simple, i'm very new to php, well, any programming language actually

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

please help
HTML Code:

Code: <span id="ctl00"><span>

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

Target costs on Process orders not calculating
Hi All,

We have released standard costs for all the materials. We have also done Goods r

Count Session and Trigger Events
I am New in PHP, seeking a method to count logged users by counting the sessions or any …, is

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash