I'm sure question has been asked. How can I do this? How can I edit a htpasswd file? The pathes are right, no fork errors. But file does not change. I know ... it's a dangerous script, but what do you want, I need it!
Post & replies are helpful :) Thanks, John ---------------snip----------------------- <FORM ACTION="testme.php" METHOD=POST> Username: <INPUT TYPE="text" NAME="User"><BR> Password: <INPUT TYPE="text" NAME="Pass"><BR> <INPUT TYPE="submit"> </FORM> <?php $htpass = "c:\Program Files\EasyPHP\apache\bin\htpasswd.users"; if(($User == "") || ($Pass == "")){ echo "No username or password! No chance! Quitting."; exit; } //$lastline = exec('c:\Program Files\EasyPHP\apache\bin\htpasswd -b $htpass $User $Pass'); //echo $lastline; // $lastline contains last line of output from htpasswd, so // you could do some error checking here //system(escapeshellcmd("c:\Program Files\EasyPHP\apache\bin\htpasswd -b $htpass $User $Pass"),$error); echo "Done! Set $User with $Pass" ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]