Enter Your Name: '; } else if($_GET["action"] == "Add Name") { $_SESSION['username'] = $_GET['username']; echo '

Welcome '.$_SESSION['username'].'

'; } else if($_GET["action"] == "Add Color") { $_SESSION['color'] = $_GET['color']; echo '

Welcome '.$_SESSION['username'].'

'; } else if($_GET["action"] == "Add Size") { $_SESSION['size'] = $_GET['size']; echo '

Welcome '.$_SESSION['username'].'

'; $data = $_SESSION['username'].",".$_SESSION['color'].",".$_SESSION['size']."\n"; $filename = "welcomedata.txt"; $myfile = fopen($filename, "a"); if (!$myfile) { die("Unable to open $filename."); } fwrite($myfile, $data); fclose($myfile); } ?>