<frame name="main" src="lock.php" marginwidth="5" marginheight="5" NORESIZE frameborder="no">
Frage: Will wenn closed in DB eingetragen (sonst nicht) automatisch in das main-Frame eine index.php laden?!?!
Du schickst einfach per header() einen HTTP-Redirect (z.B. Statuscode 302) und gibst die neue Adresse als Location-Kopfzeile an:
header("HTTP/1.0 302 Found");
header("Location: index.php");
Mehr Infos: PHP-Anleitung, Kapitel "HTTP Functions", und RFC 2616, Abschnitt 10.3.3ff.
Gruß,
soenk.e