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
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

Prevent PHP mail( ) from appending hostname to from address
Hey guys,

I want to be able to send texts to phones via email (since each phone has their own

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Problem assigning value to variable in "IF" function
Does this script makes sense? I am trying to take the value that is set to "authenticat" a

Check premium expire
Hi,

I am making a simple file hosting site and want to check if users premium subscriptions h

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

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