PHP MySQL - Error: No Database selected

前端 未结 6 1026
傲寒
傲寒 2020-12-22 14:23

I am trying to read and write to a database. Here is the code I have so far:

$mysql = mysqli_connect(\"example.com\", \"johndoe\", \"abc123\"); // replace wi         


        
6条回答
  •  无人及你
    2020-12-22 14:49

    Try using mysql_select_db in between the database connection and the table creation.

    Also, mysql_ is deprecated, please use mysqli_ instead

提交回复
热议问题