prepare($check_query);
$stmt->bind_param("ssss", $child_name, $date_of_birth, $father_name, $mother_name);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
// ❌ Duplicate entry found, show error message
$existing_record = $result->fetch_assoc();
$existing_ref = $existing_record['reference_number'];
echo "";
exit;
} else {
// ✅ Proceed with inserting new birth record
$stmt = $conn->prepare("INSERT INTO birth_records (child_name, child_name_marathi, date_of_birth) VALUES (?, ?, ?)");
$stmt->bind_param("sss", $child_name, $child_name_marathi, $date_of_birth);
$stmt->execute();
$child_id = $stmt->insert_id;
$stmt->close();
// Generate a unique reference number (GP-KEKATPANGARI-YYYYMMDD-XXXX)
$reference_number = "GP-KEKATPANGARI-" . date("Ymd") . "-" . str_pad($child_id, 4, "0", STR_PAD_LEFT);
// Update the reference number in the birth record
$stmt = $conn->prepare("UPDATE birth_records SET reference_number = ? WHERE id = ?");
$stmt->bind_param("si", $reference_number, $child_id);
$stmt->execute();
$stmt->close();
// Insert parents' information
$stmt = $conn->prepare("INSERT INTO parents (child_id, father_name, mother_name) VALUES (?, ?, ?)");
$stmt->bind_param("iss", $child_id, $father_name, $mother_name);
$stmt->execute();
$stmt->close();
// ✅ Successfully registered, redirect to the receipt page
header("Location: birth_receipt.php?ref=" . urlencode($reference_number));
exit;
}
}
?>
🌐
Reader Environment
Country
Detecting...
Currency
Loading
Today
Loading
Language
Loading
🔥 Trending This Week
- Finding popular stories...
Buy Me a Coffee
❤️ Enjoying This Blog?
☕
Support My Work
Your support helps me create more free guides, tutorials and helpful content.
Home Recent Posts Display
ULTIMATE BLOGGER PILLARS 2026
🚀 Blogger SEO Master Hub 2026
Ultimate Blogger Growth & SEO Resource Center
Access the complete Blogger SEO ecosystem including technical SEO, Google Discover optimization, structured data, Core Web Vitals, AI SEO tools, topical authority frameworks, and advanced ranking strategies.
⚡ Blogger SEO Foundation
🚀
Ultimate Blogger SEO Guide NEW
Master on-page SEO, technical SEO, indexing, rankings, and authority building.
🔍
Search Console Error Fixes
Resolve indexing issues, sitemap errors, coverage reports, and Discover problems.
⚡
Core Web Vitals Optimization
Improve CLS, LCP, INP, page speed, and user experience metrics.
🧩 Schema & Structured Data
🎨 Blogger Widgets Collection
🏗️ Topical Authority Framework
🛠️ AI & SEO Tools
🔥 Google Discover Growth
📊 Analytics & Tracking
🔍 No matching SEO resources found.
🚀 Blogger Growth System 2026
Ultimate Blogger SEO & Growth Resource Center
Explore powerful Blogger resources including SEO, Google Discover optimization, structured data, AI tools, Core Web Vitals, content strategy and authority building guides.
⚡ Blogger SEO Foundation
🔥 Google Discover Growth
🧩 Schema & Technical SEO
🤖 AI & Creator Tools
🏆 Authority & EEAT
🚀 Keep Growing Your Blog
Explore more SEO resources, AI tools and Blogger tutorials.
Explore Tools →
🔍 No matching resources found.