try this you had many errors in this code, i'd suggest relooking at the php syntax using quotes and how to properly escape quotes.
This should work, i think i've fixed all the errors, but if it still doesn't work, repost the code up here and i'll take another look. -g
<?
new_user();
function new_user($nimi,$aja_koefitsent,$elukoht,$isikukood,$amet,$aktiivne,$parool)
{
$options = array("Täiskoormus","Poolkoht","Kohakaaslus","Tööleping lõpetatud","Puhkus","Dekreet");
if(empty($aktiivne)) {
$aktiivne=array(-1);
}
echo "<FORM ACTION=\"admin.php\" METHOD=\"POST\">
Nimi: <INPUT TYPE=\"text\" NAME=\"nimi\" VALUE=\"$nimi\"><BR>
Aja koefitsent: <INPUT TYPE=\"text\" NAME=\"aja_koefitsent\" VALUE=\"$aja_koefitsent\"><BR>
Elukoht: <INPUT TYPE=\"text\" NAME=\"elukoht\" VALUE=\"$elukoht\"><BR>
Isikukood: <INPUT TYPE=\"text\" NAME=\"isikukood\" VALUE=\"$isikukood\"><BR>
Amet: <INPUT TYPE=\"text\" NAME=\"amet\" VALUE=\"$amet\"><BR>
parool: <input type=\"password\" name=\"parool1\" VALUE=\"$parool1\"> <br>
parool uuesti:<input type=\"password\" name=\"parool\" VALUE=\"$parool2\">> <br>
Staatus: <SELECT NAME=\"aktiivne[]\">";
// combo boxile valikute valimine
for ($i=0; $i < count($options); $i++) {
echo "<OPTION VALUE=\"";
echo "$options[$i]\"";
if(current($aktiivne) == $options[$i]) {
echo " SELECTED";
next($aktiivne);
}
}
echo "</select> <BR>
<input type=\"submit\" name=\"submit1\" size=\"20\">
</form>";
}
?>