Re: Simulate the Enter key in Unix with PHP
| From: | barce | Date: | Sat, 12 May 2001 07:33:27 +0000 |
| Subject: | Re: Simulate the Enter key in Unix with PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52549@lists.php.net to get a copy of this message | ||
hello,
YoBro wrote:
>
> Have you got an example of how to use the -b switch.
> I am not up with lingo when it comes to unix.
>
<?php
/* try this */
if ($pressed)
{
$result = passthru("htpasswd -b mypasswordlist $user $pass");
echo "$result<br>\n";
}
else
{
?>
<form method=POST action="<? echo $PHP_SELF; ?>">
user: <input type=text name=user><br>
pass: <input type=password name=user><br>
<input type=submit name=pressed value=' GO '>
</form>
<?
}
?>