- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
Latest commit
23 lines (23 loc) · 648 Bytes
/
Copy pathindex.php
File metadata and controls
23 lines (23 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
if (isset($_POST['query'])) {
$query = $_POST['query'];
requiredirname(__FILE__) . '/sqlFormatter.php';
$o = newSqlFormatter();
$formattedQuery = $o->format($query);
} else {
$query = '';
$formattedQuery = '';
}
?>
<form method="POST">
<label for="query">Query to format<label><br />
<textarea name="query" rows="10" cols="100"><?phpecho$query; ?></textarea><br />
<input type="submit" value="Format!" />
<?phpif($formattedQuery): ?>
<br />
<br />
<br />
<label for="formattedQuery">Formatted query<label><br />
<textarea name="formattedQuery" rows="10" cols="100"><?phpecho$formattedQuery; ?></textarea>
<?phpendif; ?>
</form>