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

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

getting most records by count
Code: [Select]<?php

$connect = mysql_connect("localhost","dam

DELETE FROM not working deletes wrong row
Hello

I have the following code which i found but it doesnt work properly.. it comes up with

Getting PHP to ammended the selected in option field
Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

a multi dimensional array with for each
hi, I have been asked to write an array, I have Zone 2,3,4,5,6,7,8 each zone has 3 sections of weigh

timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db u

Execure stored procedure on a timer
Can someone tell me an easier way to execute a stored procedure on a timer? I am using Oracle 10g R

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

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