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

How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

building a function with multiple outputs
I want to build a function that has multiple outputs.

I know but am not to sure how I should

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

TCP Sending Unsigned Char...
Hi...

I want to send over tcp/ip some data, i have the data in hexadecimal, and when i tr

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and

Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but....

I'm scraping a ringtone site

mysql select with $_get ?
Hi, i have this code:
Code: // If char id is 0 and character dont exist do:
if ($_GET["id

Getting a variable to work in function params
I have this fuction which is inside a class:

Code: public static function generateEmbedCode($

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