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
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)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.