0
create a table in a database with php
I'm moving my first steps with connecting php with databases. I want to create a table inside a database called "prova", inside a localhost made with xampp, but my code doesn't seem to work: $conn = mysqli_connect("localhost", "root", "", "prova"); $sql = "CREATE TABLE table_one( col1 varchar(255) );"; mysqli_query($conn, $sql);
1 Respuesta
+ 1
You could follow one of the online tutorials like this:
https://www.tutorialrepublic.com/php-tutorial/php-mysql-create-table.php
If you check the status of each step, like was the connection successful, was the table created, you can better figure out where is the issue. Help yourself analyse it with error messages that you write.