<input type=button onClick="<? scramble(); ?>" value="Scramble">
more like that
yes you can get form varibles into a php funtion just do somthing like this...
function form(var, var2, var3) {
echo $var.$var2.$var3;
}
form($_REQUEST["var"], $_REQUEST["var2"], $_REQUEST["var3"]);
the above is after you submit the form, you cannot get the info like in java since php is server side not client Its why most Php programmers just submit abck to the same page and do somthing like this