Is there a way to have a button take the value of a textbox on the same page and append the value to an existing string, which the button would use for a href link. Ex:

[CODE]
<html>
Enter the class date (format ddmmyy)<br>
<input type= "text" name = "classlink"><p><br> //input from the user

<?php

$str1 = "http://siteaddress/";
$str2 = 'classlink';
$str3 = ".wmv";

$str4 = $str1.$str2.$str3; //combine the strings

echo "<a href=", $str4, ">Test</a><br><br>";


?>

<input type= "button" value="Enter" ONCLICK= '$str4'><br> //link to a file using the value from the text box as part of the link address.
[Code]

Thanks for the help, kind of new to web page coding so if theres a way to do this using just html code that would be even better.