I am a beginner at php, but I want to write a script that will redirect me to an address with an attribute equal to the value of a form input. Is this the correct way?
index.html
<form action="process.php" method="post">
<input type="text" name="name" placeholder="Your Name" />
<input type="submit" />
</form>
and heres process.php:
<?
header('Location: level1.html?name=' . $_POST['name']);
?>
For some reason, it doesn't work. Is there a better way? Thanks!
<?would cause an error).