<?php
function wachtwoord($aantal)
{
  $tekens = array('a','b','c','1','2','3'); //Hier kan je zelf meer tekens toevoegen!
  $totaal = count($tekens) -1;

  for ($i=0; $i<$aantal; $i++)
  {
  	$id = rand(0, $totaal);
  	$wachtwoord .= $tekens[$id];
  }

  return $wachtwoord;
}

$wachtwoord = wachtwoord(10);
echo "Je wachtwoord: <B>".$wachtwoord."</B><br>\n";
echo "<A HREF=\"javascript:location.reload();\">Opnieuw genereren!</A>";
?> 