I need help with the foreign key, this is the php portion of my site to insert records, i am testing so i am only entering one. When i hit the creat account button it sends me to another page to insert additional info. I add info to the first page no problem but when i add to the 2nd page and submit i get the error: Cannot add or update a child row: a foreign key constraint fails (`search_info`.`properties`, CONSTRAINT `properties_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `information` (`customer_id`) ON DELETE CASCADE ON UPDATE CASCADE). Can someone help please?
Without knowing the rest of your setup; you probably are most likely entering a "customer_id" that does not coincide with an existing customer_id reference on the "information" table.
hello,check if you are entering the correct value of customer_id into the INFORMATION table. the value should be the same as you are trying to enter into the second table. Make sure it gets saved in the INFORMATION table.