Jump to content

check a certain portion of url


samoht

Recommended Posts

hello all,

 

I was wondering how to check a certain portion of my url with php.

 

my url may be something like:

index.php?option=com_content&view=article&id=17:special-offers&Itemid=11&form=thanks

 

what I want to check is just the value of "form" - and I am not sure where it is going to show up in the query string - so I don't want to just strip the last characters etc.

 

can I do something like:

 

if ($_SERVER[REQUEST_URI](form) == "thanks") { ??

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/109602-check-a-certain-portion-of-url/
Share on other sites

if you just want to strip the the value of the form valriable

then you have to get the form variable value by using

super global function and that is $_GET['name of the variable that you want to strip']

 

  after getting just play with it or replace it strip it .

 

  that's it what else you need :'( :-* :-\ :-X :P ??? 8)

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.