All pastes #669769 Raw Edit

PHP RANDOM WORD GENERATOR

public php v1 · immutable
#669769 ·published 2007-08-25 01:27 UTC
rendered paste body
<html>	<title>Random word generator</title><body><FIELDSET><form action="random.php" method="post">Characters to use&nbsp;<input type="text" name="tletters"/><br>Length of word&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="tlength"/><br><input type="submit" name="submit" value="Generate"/></form></FIELDSET><?phpif(isset($_POST['tletters']) && isset($_POST['tlength'])){$chars = $_POST['tletters'];$size = $_POST['tlength'];echo "Generating random word with these characters - <br><b>" . $chars . "</b> and a length of <b>" . $size . "</b><br><br>";for($i=0;$i<$size;$i++){	echo "<b>" . substr($chars,rand(1,strlen($chars)),1) . "</b>";}}?>