Input my php in mysql without repeat?

前端 未结 1 1379
暖寄归人
暖寄归人 2021-01-29 10:46

I create this code to add some data in my db without repeat.
but that is not work and I can\'t add data create by this php to my table.
what\'s the problem ?
P.S: I

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

    I am surprised that this does not throw any errors. One as Barmar mentioned, you cannot mix sqli and sql functions.

    Also logically, I do not see you select any database.

    Try this first

    $con=mysqli_connect("localhost","my_user","my_password","my_db") or die('error message');
    

    then use

    mysqli_query($con,"your query here");
    

    let me know the results.

    0 讨论(0)
提交回复
热议问题