Hi all
I have a problem. I need to create a script that takes user input from a form (Username, Password, Domain) and with these input go to the page that contains their website statistics. I can't get the form to pass the input to the script to process the link and go there. Here is the code:
Any help would greatly be appeciated.
I have a problem. I need to create a script that takes user input from a form (Username, Password, Domain) and with these input go to the page that contains their website statistics. I can't get the form to pass the input to the script to process the link and go there. Here is the code:
Code:
//javascript headercode:
<script type="text/javascript"><!--
function login (form)
{
var domainname = form.domainname.value;
var username = form.username.value;
var password = form.password.value;
var server = "http://" + domainname + "/_system_/" + username + "/awstats/awstats.pl";
window.location = server;
}
//-->
</script>
//form code:
<form action="login" method="post" name="Log_In">
<div align="center">Provide the folowing information:
<p>Domain: <input type="text" name="domainname" size="24" value= ""/></p>
<p>Username: <input type="text" name="username" size="24" value= ""/></p>
<p>Password: <input type="text" name="password" size="24" /></p>
<p><input type=button onclick="login(log_in.domainname.value)" type="submit" name="Log In" value="Log In" /></p>
</div>
</form>
Comment