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 remove in php string display
My code is

$message="We're looking at developing our website.";

$body= "

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

How to disable direct access to a file
Suppose I've 2 Files. 1.php & 2.php

I don't want anybody to access 2.php directly fr

Get value from Select menu
Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A descrip

url- go to webpage
i have an input text field and submit button.

how do i make the url entered into the textfiel

A problem with my GD class
Hello,

I created a nice (and simple for now) GD class.
The problem is , it works great on

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Using the $_GET variable to view certain records
Hello,

First let me explain my problem, I have 2 pages the first page pull a list of Guide ti

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

A rank users order by points
I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.ran

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