Lets say I am asking users (on my local machine) to input their email address to sign up for a raffle.
<!DOCTYPE HTML>
<head><title>Raffle</title></head>
<script type="text/javascript">
var email;
function foo(){
email = document.getElementById("Email").value;
alert(email);
}
</script>
<body>
<input id="Email" name="Email" type="email">
<input type="Submit" id="submit" name="submit" onclick="foo();">
</body>
Fiddle
When the user hits submit, the email address pops up in front of them. Is there any way to simultaneously store the variable email
in an external file (.php
, .txt
etc.)