I used to create tables in PhpMyAdmin and then used them in php scripts. But now I need to create tables from the php script. can someone help me please?
Perhaps this article I wrote may help you...
Create a MySQL Table with PHP.
I tried with that code but it displays the following error:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource.
I think the error is in the : mysql_query( $sql, $conn ); whats exacky the $conn for?
I made a small change and now it works. I added:
$result = $db->query($sql, $conn);
instead of the other line.