I have a variable that is being passed to me via a form... I have tried to use this variable in a function but have been unsucessfull can anyone help?
//page one
<form method='post' action='nextpage.php'>
<input type='text' name='firstname' value='travis'>
<input type='submit' name='submit' value='Submit></form>
//nextpage.php
echo("$firstname ");
function valech()
{
echo("this is the function '$firstname"' it should output variable firstname");
}
//nextpage.php output
travis this is the function '' it should output variable firstname
is there a way to use the variable inside the function?
Thank You
Travis Harris