简体   繁体   中英

passing parameters by GET php

I am writing a web app and at some point, I have a list of projects and when the user clicks on view on one of the projects I need to display the correct project page, basing on the project ID. (All the projects are stored in a Database). I am trying to pass the project id by a URL query string that should look like this

user/project/view&proj_id=2

then in my index.php, I try to var dump the $_GET but it says is an empty array while if I try to var dump the URI I get user/project/view&proj_id=2

ho can I correctly pass and retrieve parameters with $_GET ?

Use ? instead: user/project/view?proj_id=2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM