dongxing4643 2016-08-17 13:16
浏览 211

PHP:一个URL中有两个GET请求?

Can I use two GET requests in one url.

http://localhost/ecommstore/category_grid.php?pn=1.

Here pn=1 is for pagination. I want here another GET request for sub_category.

Can you please help me that how to do that and separate these two get requests correctly?

  • 写回答

1条回答 默认 最新

  • dongwen5019 2016-08-17 13:17
    关注

    Yes by using & between two parameters. You can write your url like this

    http://localhost/ecommstore/category_grid.php?pn=1&sub_category=sub_categoryName
    

    Here before your first parameter you should write ? and after first parameter you should separate them by &. It works for me. Hope it helps you

    评论

报告相同问题?