0

I have example link

http://mysite/login?user_id=6?reg=true

how get user_id and reg values form $_GET? Or how construct link, because this is link from e-mail verification user.

if i write:

echo ($_GET['user_id']);

Then get this:

6?reg=true

And i try :

echo get_query_var( 'user_id');  

But not work. What i do wrong?

I have permalink numeric.

  • URL is not correctly generated. Share the code that resulted in this malformed URL. – Qaisar Feroz Mar 24 at 19:22
  • mrben522 answer correctly. I must change '?' to '&'. – polyman Mar 24 at 19:23
2

Your URL querystring is malformed. ? good before the first variable. & goes before any others. Your url should be http://mysite/login?user_id=6&category=3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.