<?php
	require_once 'conn.php';
	$data = json_decode(file_get_contents("php://input"));
	
	$firstname = $data->firstname;
	$lastname = $data->lastname;
	$address = $data->address;

	
	try{
		$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
		$sql = "INSERT INTO `member`(firstname, lastname, address)  VALUES ('$firstname', '$lastname', '$address')";
		$conn->exec($sql);
	}catch(PDOException $e){
		echo $e->getMessage();
	}
	
	$conn = null;
?>