Код: <html> <head> <title>Генератор</title> <style> body{ padding:10px; background:#2A2E33; font-family:tahoma, verdana, arial; font-size:11px; text-align:center; color:#B9B9BD; } form{ padding:10px; border:1px solid #666; width:200px; margin:0 auto; } input{ vertical-align:middle; margin:1px 0; padding-right:10px; border:1px solid #336600; padding:2px; background:#363940; color:#B9B9BD; } </style> </head> <body> <? if($_POST['s'] && $_POST['num'] && $_POST['num'] > 2 && $_POST['num'] <= 100) { function passgen($n) { $symb = '!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?№;%-=qwertyuiop[]asdfghjkl'zxcvbnm,./'; $pass = ''; $pass = ''; for($i=0;$i<$n;$i++) { $pass .= $symb{rand(0,strlen($symb)-1)}; } return htmlspecialchars($pass); } echo ' '.passgen($_POST['num']); } elseif(!$_POST['s']) { ?>