44 lines
782 B
Plaintext
44 lines
782 B
Plaintext
|
|
void show_form()
|
|
{
|
|
|
|
<><form action="?" method="post">
|
|
<div>
|
|
<label>Some text:</label>
|
|
<input type="text" name="field" value="<?= context->post["field"] ?>"/>
|
|
</div>
|
|
<div>
|
|
<label>Some multiline text:</label>
|
|
<textarea name="field2"><?= context->post["field2"] ?></textarea>
|
|
</div>
|
|
<div>
|
|
<input type="submit" value="Submit Form"/>
|
|
</div>
|
|
</form></>
|
|
|
|
}
|
|
|
|
RENDER()
|
|
{
|
|
|
|
<><html>
|
|
<link rel="stylesheet" href='style.css?v=1'></link>
|
|
<h1>
|
|
<a href="index.uce">UCE Test</a>:
|
|
Form POST
|
|
</h1>
|
|
|
|
<? show_form(); ?>
|
|
|
|
<label>Parsed POST fields</label>
|
|
<pre><?= var_dump(context->post) ?></pre>
|
|
|
|
<label>Raw POST content</label>
|
|
<pre><?= context->in ?></pre>
|
|
|
|
<label>CGI Params</label>
|
|
<pre><?= var_dump(context->params) ?></pre>
|
|
</html></>
|
|
|
|
}
|