diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-05-27 00:31:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:04 -0500 |
commit | 26a8394ee92443ce2a9688bc01a02df4c2ad74fa (patch) | |
tree | b31846a79fa577cf2f370ab62d7baae3cdad22ad /swat/esptest/formtest.esp | |
parent | fc45b63e478f6f891f0d04bf49423be30a63617d (diff) | |
download | samba-26a8394ee92443ce2a9688bc01a02df4c2ad74fa.tar.gz samba-26a8394ee92443ce2a9688bc01a02df4c2ad74fa.tar.bz2 samba-26a8394ee92443ce2a9688bc01a02df4c2ad74fa.zip |
r6999: - renamed our html files to esp
- added a favicon.ico so bookmarks show a samba icon
- added a session.esp demonstration of session variables
(This used to be commit 092ffc733916f8091c8ff1e7a1306810e516d613)
Diffstat (limited to 'swat/esptest/formtest.esp')
-rw-r--r-- | swat/esptest/formtest.esp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/swat/esptest/formtest.esp b/swat/esptest/formtest.esp new file mode 100644 index 0000000000..7996900eb2 --- /dev/null +++ b/swat/esptest/formtest.esp @@ -0,0 +1,41 @@ +<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.esp"); + } +%> + 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> |