I think it is the problem with your table type.
As of my knowledge ,MyISAM won't support referential integerity.
To have foreign key support you should have innodb or bdb table type support.
If you have innodb or bdb support it is just the matter of altering your table
by issuing the following query
mysql> alter table tablename type='innodb'