AW: how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
i hope I got you right.

You can send data to the next php file by HTTP-GET.
Simply add a ? behind the link and then <variablename>=<value>.
Example   ./jumpto.php?to=searchProduct

In the jumpto.php you would ask the Global Array for Get Variables for the
entry and then decide what to do.

Example:

sf($_GET["to"] == "searchProduct"){
	header("Location: ./searchProduct.php");
}

Or if you have a lot of locations to jump to you could do that by case.

switch($_GET["to"]){
	case "seachProduct":
			header("Location: ./searchProduct.php");
			break;
	case "seachMember":
			header("Location: ./searchMember.php");
			break;
}

I hope that helped.

Greetings
Mirco Blitz
-----Ursprüngliche Nachricht-----
Von: xkorakidis [mailto:xkorakidis@xxxxxxxx] 
Gesendet: Samstag, 19. November 2005 05:10
An: php-general@xxxxxxxxxxxxx
Betreff:  how can I CALL a PHP script from different TEXT LINKS with
differentPARAMETERS?

Hi,
I'm not so keen on PHP (so on English :) ) and I have a little problem:
On the left side of the page there is the following menu:

PRODUCTS
	Search
	Add
MEMBERS
	Search
	Add
ORDERS
	Search
	Add

Is that possible to link each "Search", "Add" to a "Search.php" and
"Add.php" page and give a parameter to php script so as to make an "on
the fly" "searchProducts.php" or "AddProducts.php" or
"SearchMembers.php" etc?
If I make individual "searchProducts.php" or "AddProducts.php" files
these won't have many differences, so I Think it's better to make these
on the fly.

Any Idea?

Thanks in advance.
Christos Korakidis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux