WordPress Form Receive (POST)

This is the receiving page for the simple form submit.

This is the code

<?php	
	if (isset($_POST['firstname']) && $_POST['firstname']){
		$first_name='"'.$_POST['firstname'].'"'; 
		$last_name='"'.$_POST['lastname'].'"'; 

		echo "<p>First Name: $first_name </p>";
		echo "<p>Last Name: $last_name </p>";
	} else {
	
		echo "<p> Error: some or all of the fields were not completed.</p>";
		
	}
?>