I'm trying top pass a value to php and run a function. But I can not get it to work?
<form action="" method="post">
Name:
<input type="text" name="val1" id="val1"></input>
<input type="submit" value="Submit"></input>
</form>
<?php
if( isset($_POST['submit']) ){
$folder = htmlentities($_POST['val1']);
}
if( isset($folder) ) {
//do something with $folder
}
?>
isset($_POST['submit'])always returnsFalse