Hello,
I got bored so I made a password generator script in a few minutes. All you have to do is put these codes in the correct file names.
index.php
result.phpCode:<html> <head> <title>Password Generator Script</title> </head> <body> <h2>Password Generator</h2><br /> <form action="result.php" method="post" />Choose number<br /> <input type="text" name="number" /><br /> <input type="submit" value="Generate Password" /> </form> </body> </html>
PHP Code:$number = $_POST['number'];
switch($number)
{
case 6:
$string = "abc123";
echo $string/2;
break;
case 7:
$string = "abc1234";
echo $string/2;
break;
case 8:
$string = "abcd1234";
echo $string/2;
break;
case 9:
$string = "abcd12345";
echo $string/2;
break;
case 10:
$string = "abcde12345";
echo $string/2;
break;
default:
echo 'Invalid number.';
}
$string_shuffled = str_shuffle($string);
echo $string_shuffled;
?>



Reply With Quote


