Cannot add or update a child row: a foreign key constraint fails .this error occured then what can i do.

Make sure the foreign key exists before inserting. Apparently you're adding a record pointing to something that does not exists yet.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.