Hi.
I have been thinking of a way to use a navigation system and I just want to know if this will work.
Ok, I have a navigation bar with three links in, 'Home', 'Links' and 'Contact' (just an example). If anyone clicks on these links it will take them to process.php (no matter what link is clicked). Now is it possible using $_POST or something to detect which link was clicked? If so how? Because if possible I would then get the link that was clicked and connect to a database and select the code for the page that was selected.
Thanks
Rob
Is this Possible?
Started by Rob_BCFC, Jan 28 2006 05:46 AM
2 replies to this topic
#1
Posted 28 January 2006 - 05:46 AM
#2
Posted 28 January 2006 - 05:59 AM
im not sure that would work, as $_POST would require a form, which im not sure you can do...
what you could do is send it to process.php with process.php?page=xxxx and then use if($_GET['page'] == xxxx){ do... } else( ..... you get the drift.
or are you just asking about using $_POST to keep the url tidy? if so you could just use mod rewrite to show the url as process.php which would still work.
in short i think you need to use GET and not POST... but i await some more ideas...
what you could do is send it to process.php with process.php?page=xxxx and then use if($_GET['page'] == xxxx){ do... } else( ..... you get the drift.
or are you just asking about using $_POST to keep the url tidy? if so you could just use mod rewrite to show the url as process.php which would still work.
in short i think you need to use GET and not POST... but i await some more ideas...
#3
Posted 28 January 2006 - 06:04 AM
I'll try what you said with do/else statements thanks a lot mate.
EDIT: Thanks so much it worked perfectly.
EDIT: Thanks so much it worked perfectly.
Edited by Rob_BCFC, 28 January 2006 - 06:12 AM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
