newbee on php/mysql
hi! Im not so good at this... so please help me out.im trying to create a new table in my mysql-database with this php script:
<?
include_once("config.php"); // this file contains the connection string and the variables like $database
mysql_db_query("$database","CREATE table anvandare (id INT(10) NOT NULL AUTO_INCREMENT,
PRIMARY KEY( id ),
anamn VARCHAR( 20 ),
pass VARCHAR( 20 ),
fnamn VARCHAR( 20 ),
enamn VARCHAR( 20 ),
pernr INT( 6 ),
pernr2 INT( 4 ),
adress ARCHAR( 20 ),
postnr ARCHAR( 20 ),
ort ARCHAR( 20 ),
telnr ARCHAR( 20 ),
epost ARCHAR( 20 ),
kon ARCHAR( 6 ),
utsk VARCHAR ( 2 ),
aktkod VARCHAR ( 3 ),
akttid VARCHAR ( 20 ),
)") or die("Error! Reason: " . mysql_error());
Echo "<br>rätt!<br>";
?>
and i get this message when i run the page:
Error! Reason: You have an error in your SQL syntax near 'ARCHAR( 20 ), postnr ARCHAR( 20 ), ort ARCHAR( 20 ), telnr ARCHAR( 20 ), ' at line 9
please help in english..
