|
Posted by rossz on 09/26/05 06:59
tencip wrote:
> 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.
Ok, this is an ugly hack that uses javascript. I would never use it
because there is no guarantee javascript is enabled.
<html>
<body>
<? if (!is_null($_POST['domain'])) { ?>
<form name='second' method='POST' action='<? $_POST['domain'];
?>/test/test2.php'>
<input type='hidden' name='name' value='<? print $_POST['name']; ?>'>
<input type='hidden' name='password' value='<? print
$_POST['password']; ?>'>
<input type='submit'>
</form>
<script language="javascript">document.forms[0].submit()</script>
<? } else { ?>
<form method='POST'>
domain: <input type='text' name='domain'><br>
Name: <input type='text' name='name'><br>
Password: <input type='text' name='password'><br>
<input type='submit'>
</form>
<? } ?>
</body>
</html>
Navigation:
[Reply to this message]
|