i am new to php and mysql. i am now having online tutorials for this topic. i use wamp and already created various databases without tables in it yet. now i created a file createTable.php with these line of codes:
<?php
mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
mysql_query("CREATE TABLE example(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
name VARCHAR(30),
age INT)")
or die(mysql_error());
echo "Table Created!";
?>
in this code i create a table named example. now when i check inside phpmyAdmin in wamp the example table is not added on the test database. what's the problem with my code? or is it the WAMP?