Error when inserting into sql database using php

后端 未结 1 1178
无人及你
无人及你 2021-01-29 01:22

I have a program with a MySQL insert query:

        $sql = \"INSERT INTO people (person_id, name, username, password, email, salt)
                VALUES ($perso         


        
相关标签:
1条回答
  • 2021-01-29 01:51

    You're missing quotes around your string values:

    $sql = "INSERT INTO people (person_id, name, username, password, email, salt)
                VALUES ($person_id, '$name', '$username', '$password', '$email', '$salt')";
    
    0 讨论(0)
提交回复
热议问题