aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/goback.ur
blob: ef61a817997776c5257350c56225a11be76a1b8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
table channels : { Channel : channel {} }

fun get () =
    ch <- channel;
    dml (INSERT INTO channels (Channel) VALUES ({[ch]}));
    return <xml><body onload={recv ch}>
      Hi.
    </body></xml>

fun post () =
    ch <- channel;
    dml (INSERT INTO channels (Channel) VALUES ({[ch]}));
    return <xml><body onload={recv ch}>
      Hi!
    </body></xml>

fun main () = return <xml><body>
  <li><a link={get ()}>Get</a></li>
  <li><form><submit action={post}/></form></li>
</body></xml>