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?

66 Like 39 Dislike
Previous php-forum Next php-forum
Other php-forum

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

php wont update my db
hello,

sorry for posting in mysql forum but i dont know where exactly is the problem but here

PHP page loading in Firefox but not in IE
hello,

i am currently doing a project in PHP and i have a problem. If I view the project in M

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

PHP Login
Hey!
I got this shopcart code online, am trying to modify it but am getting an error when i try a

Content-Disposition: attachment; filename=... not working as i thought it should
taken the following code from the php.net site the script is not working.

what is not happeni

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

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