6 <h1>Samba4 form test</h1>
8 <form name="FormTest" method="POST" action="@@request['SCRIPT_NAME']">
9 firstName: <input name="firstName" type="text" value=""><br>
10 lastName: <input name="lastName" type="text" value=""><br>
11 <input name="submit" type="submit" value="OK">
12 <input name="submit" type="submit" value="Cancel"><br>
16 /* if its a post then the user has filled in the form, so
19 if (request['REQUEST_METHOD'] == "POST") {
21 /* if they cancelled then take them back to the list of tests */
22 if (form['submit'] == "Cancel") {
23 redirect("index.esp");
26 You chose firstName=@@form['firstName'] lastName=@@form['lastName']
29 function showArray(name, array) {
30 write("<h3>Array: " + name + "</h3>\n");
32 write(name + "[" + v + "]=" + array[v] + "<br>\n");
36 showArray("form", form);