why i cannot create foreign key in my table payments.
crate table students( text char(5)NOT NULL, id int(11)NOT NULL AUTO_INCREMENT, name varchar(250), level var
Because MyISAM does not support foreign keys. The FK declarations are parsed, but otherwise ignored. You need to use InnoDB tables for real FK support.