I am trying to create a new nginx user on my Server with inputs from the Website. in alternativ to system(...) I also tried exec(...) and shell_exec(...). nothing seems to happen :/ i am very inexperienced sorry.
this command should be executed in linux "htpasswd /etc/nginx/.htpasswd (username)" then your prompted to put in a password and finally repeat that password.
<form action="make-user.php" method="get">
Username: <input type="text" name="username">
Password: <input type="password" name="password1">
repeat Password: <input type="password" name="password2">
<input type="submit">
</form>
<br>
<?php $username = $_GET["username"] ?>
<?php $password1 = $_GET["password1"] ?>
<?php $password2 = $_GET["password2"] ?>
<?php system("htpasswd /etc/nginx/.htpasswd $username"); ?>
<?php system("$password1"); ?>
<?php system("$password2"); ?>