1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00
samba-mirror/swat/esptest/formtest.html

42 lines
988 B
HTML

<HTML>
<TITLE>
Samba4 ESP test
</TITLE>
<BODY>
<h1>Samba4 form test</h1>
<form name="FormTest" method="POST" action="@@request['SCRIPT_NAME']">
firstName: <input name="firstName" type="text" value=""><br>
lastName: <input name="lastName" type="text" value=""><br>
<input name="submit" type="submit" value="OK">
<input name="submit" type="submit" value="Cancel"><br>
</form>
<%
/* if its a post then the user has filled in the form, so
report the values
*/
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
redirect("index.html");
}
%>
You chose firstName=@@form['firstName'] lastName=@@form['lastName']
<%
function showArray(name, array) {
write("<h3>Array: " + name + "</h3>\n");
for (v in array) {
write(name + "[" + v + "]=" + array[v] + "<br>\n");
}
}
showArray("form", form);
}
%>
</BODY>
</HTML>