<?php 

include('admin/dbcon_outside.php');

session_start();
if(isset($_POST['warranty_register_btn_by_customer'])){
   $serial_no = $_GET['serial_number'];
   
    $query = $database->getReference("Warranty Register/")->push()->set([
        'address' => $_POST['address'],
        'name' => $_POST['name'],
        'number' => $_POST['number'],
        'serail_no' => $serial_no,
        'status' => 'Pending',
        'created_at' =>  ['.sv' => 'timestamp'],
    ]);
    
    if($query){
        
        header('Location: https://app.featherfresh.in/thankyou/index-2.html');
        exit();
    }else{
     
        header('Location: https://app.featherfresh.in/thankyou/index-2.html');
        exit();
    }
}
?>