| 
	
 | 
 Posted by tencip on 09/25/05 22:30 
Hi everyone, 
 
So, i've got a form that is very simple. It hold three elements: 
username, password, and domain. The goal here is to have the form 
submit the login to an administrative section depending on which domain 
someone has chosen. 
 
For instance, let's say we have three administrative sites, that all 
have different URLs, but we want this one form to handle logging into 
any of them. So, the form itself needs to have a dynamic action 
element. 
 
Here's an example: 
 
Code: 
 
<form action="http://www.mysite.com/admin/index.php" method="post" 
name="login" id="login" > 
	<input name="usrname" type="text"> 
	<input name="pass" type="password"> 
        <input name="domain" type="text"> 
	<input name="submit" type="submit" value="Login"> 
</form> 
 
Now, the issue is, instead of the action I have now, I need the action 
to change based on what is typed by the user in the domain field. So in 
the case above, if the user types "bobsite.com" in the domain field, 
the action needs to point to "http://www.bobsite.com/admin/index.php". 
 
I have looked near and far for a solution for this. Using PHP, so have 
some flexibility, and javascript is okay if we have to use it. 
 
Best, 
Ryan
 
[Back to original message] 
 |