File A : Test.html (assumed)
Code:
<form action="Untitled-10.php" method="post">
Name:
<input type="text" name="name" />
<input type="submit" value="Submit!"/>
</form>
File: Untitled-10.php
PHP Code:
<?php
$name = $_POST['name'];
if($name!=""){
$redirectedURL = "http:yourname.com/".$name."/free";
header('Location: '.$redirectedURL );
exit;
}else{ //user entered no values, u can use javascript on test.html for validation otherwise.
header('Location: Test.html'); //you can set a session message if you like by using $_SESSION['<name>'] for notification or if sessions aint good, check out $_GET
exit;
}
Bookmarks