Well, none of this has to do with PHP, but here ya go 🙂
Edit all of this to look the way you want, but this is the javascript you will need.
1st page(index.htm):
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
<a href="javascript:; " onClick="MM_openBrWindow('popuppage.htm','','')">popup
here</a>
2nd page(popuppage.htm):
<form name="authenticate" method="post">
<table border="0">
<tr>
<th alighn=right>User Name:</th>
<td><input name="user" type="text" size="20"></td>
<tr>
<th alighn=right>Password:</th>
<td><input name="pass" type="text" size="20"></td>
<tr>
<td colspan=2 align=center>
<input name="submit" type="submit" onClick=opener.location='newpage.htm';self.close() " value="Login">
</table>
</form>
3rd page(newpage.htm)
No JS needed...
<body>
This is your new page
</body>
Good luck 🙂