Post and get at the same time in php

前端 未结 6 2480
南方客
南方客 2020-11-27 05:56

Do you have any suggestions with my problem. I need to use get and post at the same time. Get because I need to output what the user has typed. And post because I need to ac

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 06:24

    You can only have one verb (POST, GET, PUT, ...) when doing an HTTP Request. However, you can do

    and then PHP will populate $_GET['foo'] as well, although the sent Request was POST'ed.

    However, your problem seems to be much more that you are trying to send two forms at once, directed at two different scripts. That is impossible within one Request.

提交回复
热议问题