tengo este codigo pero no me muestra resultado
Código PHP:
Ver original<?php
function createpassword() {
$sql = mysql_query("SELECT * FROM settings WHERE id='1'", $conn); $chars = $line["rndpasschr"];
$i = 0;
$pass = "";
while ($i <= $line["rndpasschrlength"]-1) {
$tmp = substr($chars, $num, 1); $pass = $pass . $tmp;
$i++;
}
return($pass);
}
if (isset($_POST["addgen"]) and
$_POST["addgen"] == "random") { $adduserstatus = "10";
$password = createpassword();
}
?>
<form id="addgen" name="addgen" action="" method="post">
<input type="submit" name="badduser" value="random" tabindex="20" class="submit" accesskey="r" title="(ALT+R)">
</form>
<?php if ($adduserstatus == "10") { print($password); } ?>