search

Home  >  Q&A  >  body text

ajax - Problems with php getting values ​​from the front end

Dear friends, I am new to PHP. As shown in the picture, the same variable $name has no value when outputted by echo. However, the input value can be found from the database below. Why is this? , detailed questions, code attached below

This is a screenshot of the ajax request of the front-end page

仅有的幸福仅有的幸福2756 days ago1278

reply all(12)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 13:05:16

    Don’t write select *

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 13:05:16

    No, it’s normal. The name of your echo is the data you submitted from the front-end form, but the $name below you is obtained from the database query. Since your sql statement is select * from table name, that is to say, no matter what you said before Can I get $name? As long as the database can be connected and the database has data, this $name can definitely be found from the database

    reply
    0
  • Cancelreply