We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8d4a77 commit 600228fCopy full SHA for 600228f
index.php
@@ -0,0 +1,23 @@
1
+<?php
2
+if (isset($_POST['query'])) {
3
+ $query = $_POST['query'];
4
+ require dirname(__FILE__) . '/sqlFormatter.php';
5
+ $o = new SqlFormatter();
6
+ $formattedQuery = $o->format($query);
7
+} else {
8
+ $query = '';
9
+ $formattedQuery = '';
10
+}
11
+?>
12
+<form method="POST">
13
+<label for="query">Query to format<label><br />
14
+<textarea name="query" rows="10" cols="100"><?php echo $query; ?></textarea><br />
15
+<input type="submit" value="Format!" />
16
+<?php if($formattedQuery): ?>
17
+<br />
18
19
20
+<label for="formattedQuery">Formatted query<label><br />
21
+<textarea name="formattedQuery" rows="10" cols="100"><?php echo $formattedQuery; ?></textarea>
22
+<?php endif; ?>
23
+</form>
0 commit comments