I have example link
http://mysite/login?user_id=6?reg=true
how get user_id
and reg
values form $_GET
?
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 example link
http://mysite/login?user_id=6?reg=true
how get user_id
and reg
values form $_GET
?
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?
Share Improve this question edited Jul 21, 2019 at 23:41 Jaron asked Mar 24, 2019 at 19:10 JaronJaron 458 bronze badges 2- URL is not correctly generated. Share the code that resulted in this malformed URL. – Qaisar Feroz Commented Mar 24, 2019 at 19:22
- mrben522 answer correctly. I must change '?' to '&'. – Jaron Commented Mar 24, 2019 at 19:23
1 Answer
Reset to default 2Your 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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745306736a4621754.html
评论列表(0条)