Ragazzi scusate, ho controllato la guida di HTML.it, ho consultato la guida ufficiale, ho cercato ovunque ma non arrivo a capo al problema.

C'è un'anima buona che mi aiuta a risolvere questo problema?

Devo relazionare due tabelle in modo tale che eliminando un record sulla prima mi elimini il corrispondente sulla seconda (utilizzando la funzione FOREIGN KEY), ma se popolo tutti i campi delle due tabelle tramite un unico form non mi si relazionanto.

Sapete dirmi cosa c'è di sbagliato in queste tabelle?

Codice PHP:
CREATE TABLE users (
   
id int(11NOT NULL AUTO_INCREMENT,
   
nome varchar(20NOT NULL,
   
cognome varchar(20NOT NULL,
   
username varchar(20NOT NULL,
   
email varchar(60NOT NULL,
   
password varchar(50NOT NULL,
   
key_control varchar(50NOT NULL,
   
ver int(1NOT NULL DEFAULT '0',
   
PRIMARY KEY  (id)
ENGINE=InnoDB;

CREATE TABLE profile (
   
id_profile int(11NOT NULL AUTO_INCREMENT,
   
id_users int(11) default NULL,
   
INDEX par_ind (id_users),
   
nomedarte varchar(100NOT NULL,
   
opz1 varchar(100NOT NULL,
   
opz2 int(1NOT NULL DEFAULT '0',
   
opz3 int(1NOT NULL DEFAULT '0',
   
opz4 int(1NOT NULL DEFAULT '0',
   
opz5 int(1NOT NULL DEFAULT '0',
   
opz6 int(1NOT NULL DEFAULT '0',
   
opz7 int(1NOT NULL DEFAULT '0',
   
opz8 int(1NOT NULL DEFAULT '0',
   
opz9 int(1NOT NULL DEFAULT '0',
   
opz10 int(1NOT NULL DEFAULT '0',
   
opz11 int(1NOT NULL DEFAULT '0',
   
opz12 int(1NOT NULL DEFAULT '0',
   
opz13 int(1NOT NULL DEFAULT '0',
   
opz14 int(1NOT NULL DEFAULT '0',
   
opz15 int(1NOT NULL DEFAULT '0',
   
opz16 int(1NOT NULL DEFAULT '0',
   
opz17 int(1NOT NULL DEFAULT '0',
   
opz18 int(1NOT NULL DEFAULT '0',
   
opz19 int(1NOT NULL DEFAULT '0',
   
PRIMARY KEY  (id_profile),
   
FOREIGN KEY (id_usersREFERENCES users (id)
ENGINE=InnoDB
Grazie