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
Don’t write select *
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