Save form data in JSON file.

Home   »   Save form data in JSON file.

 $_POST['name'],
        'email'    => $_POST['email'],
        'phone'    => $_POST['cell'],
        'birthday' => $_POST['dob'],
        'years'    => $_POST['study']
    );
    $json_string = json_encode($arr);
    file_put_contents($file, $json_string);
    echo $json_string;
}
?>





Form

0 16

Leave a Reply

Your email address will not be published. Required fields are marked *