Jump to content

Switch linking?


XFactordx

Recommended Posts

I'm trying to setup a system with links like [a href=\"http://www.blahblah.com/something.php?p=\" target=\"_blank\"]http://www.blahblah.com/something.php?p=[/a][u]variabletolinkto[/u]

I can't figure out how to set this up, and have the variabetolinkto cause the something.php to do something. Thanks.
Link to comment
https://forums.phpfreaks.com/topic/5297-switch-linking/
Share on other sites

I was asking along the lines of, lets say i get a link to index.php?p=feb02 then feb02 would get shot into a query/function or whatever and then do its thing that way. any way to set that up?

thanks for the start.

side note, feb02 IS NOT concrete, it changes. thats why im asking, i dont want to make new cases every day lol
Link to comment
https://forums.phpfreaks.com/topic/5297-switch-linking/#findComment-18897
Share on other sites

You should read the manual.

Specifically the sections on variables and $_GET variables.

[a href=\"http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.get\" target=\"_blank\"]http://us2.php.net/manual/en/reserved.vari...d.variables.get[/a]

Essentially any variable that you pass in the url is available through the $_GET array. From there you can use it and manipulate it however you want...for a query, for deciding which page to display, etc.
Link to comment
https://forums.phpfreaks.com/topic/5297-switch-linking/#findComment-18898
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.