Help with php/java popup form? (button won't submit)

I’m making it where the user types in their ‘hub’ and it brings them to it.

the form for the page before (to send the variable) is:

<form action="/hubs/main.php" name="join" method="post">
<input type="text" name="hubid">
<input type="submit">
</form>

the next page where the data is sent to is:

<html>
<head>

<SCRIPT LANGUAGE="JavaScript">

<!-- Idea by:  Nic Wolfe -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');");
}
// End -->
</head>
</script>
<body>
<form>
<input type=button value="Open the Hub" onClick="javascript:popUp('<?php $hubid = $_POST[hubid]; $file = 'http://wiicharged.com/hubchat/$dir/shout.swf';  echo $file;?>');
</form>
</body>




</html>


The main problem is getting the variables to transfer over from the php to the java (and the submit button not working)

Thanks! all help is appreciated! Where it is is at http://wiicharged.com/index.php?action=hubs;sa=join;

I appreciate it! :hugegrin: