<?php
session_start();
$submit = $_POST['submit'];
if ($submit == 'Enter Name'){
	$_SESSION['name'] = $_POST['firstname'];
	header ("Location: welcome.php");
}
?>


<form action = "saveuserdata.php" method="post">
First Name <input type="text" name="firstname" required><br>
<input type="submit" name="submit" value="Enter Name">
</form>