Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

get URL variable

in a URL i am passing variables in the following form:


i am trying to retrieve the cid variable using the $_GET function but something is not working.
when i am using "print_r($_GET);" this is what is prints:

Array ( [void] => 84?cid=46 )

how do i get the cid value back from the URL?

  • 3
1 Solution
Greg AlexanderLead DeveloperCommented:
should be

Greg AlexanderLead DeveloperCommented:
Having two (?) is the problem in other words
Greg AlexanderLead DeveloperCommented:
The (?) notes the beginning of the query string... and to appended it you will use (&) for each variable after that
Ray PaseurCommented:
PHP has a built-in function to help you avoid problems like this:
RefaelAuthor Commented:

yes of course! thank you so much for alerting me on that.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now