PHP header() called via AJAX not working properly

后端 未结 4 994
轮回少年
轮回少年 2021-01-25 06:29

I\'m new to web development.

Right now I\'m working on a login feature on a site. I used Javascript/AJAX to fetch the username and password and send it to a PHP file for

4条回答
  •  走了就别回头了
    2021-01-25 07:25

    You need to take out the echo statement before header(). Header won't work if anything has been output to the browser before it is called.

    Here's the php doc on that.

提交回复
热议问题