]> andersk Git - sql-web.git/blobdiff - tpl/main.php
form submit bug preventing signups
[sql-web.git] / tpl / main.php
index 2c019d42f581b7dc491a35dccc8c321f6a9dbd7a..1929731338d865a6ebce1904e2f06f84b115606f 100644 (file)
@@ -4,9 +4,9 @@ include 'head.php';
 
 if (isset($i_dropask)) {
        $dropdbs = array_keys($i_dropask);
-       echo '<form method="post">';
+       echo '<form method="post" action="', $URI,'">';
        foreach($dropdbs as $dbname) {
-               $msg[] = 'Are you sure you want to drop `'.$dbname.'`? <input style="position:absolute; right:20px;" type="submit" name="drop['.$dbname.']" value="Yes">';
+               $msg1[] = 'Are you sure you want to drop `'.$dbname.'`? <input style="position:absolute; right:20px;" type="submit" name="drop['.$dbname.']" value="Yes">';
        }
        echo '</form>';
 }
@@ -14,17 +14,20 @@ if (isset($i_dropask)) {
 ?>
 <h2>Databases</h2>
 
-<form method="post">
-<?php printErrors($err); ?>
-<?php printMsgs($msg); ?>
+<form method="post" action="<?=$URI?>">
+<?php printErrors($err1); ?>
+<?php printMsgs($msg1); ?>
 </form>
 
 <table width="100%">
-<form method="post">
+<form method="post" action="<?=$URI?>">
 <?php
        $bytes = $User->getBytes();
        $usage = $bytes['nBytes'];
        $total = $bytes['nBytesHard'];
+       if (!count($myDBs)) {
+               echo '<tr><td width="100%"><em>You have no databases. Add one below.</em></td></tr>';
+       } else
        foreach($myDBs as $db) {
                echo '<tr><td width="100%">';
                if ($total>0)
@@ -50,11 +53,14 @@ if (isset($i_dropask)) {
 </form>
 </table>
 
-<form method="post">
-<p><span style="width: 150px;"><label for="p1">new database:</label></span> <input type="text" name="newdb">
-<input type=submit value="Add"></p>
+<form method="post" action="<?=$URI?>">
+<p align="right"><span style="width: 150px;"><label for="p1">new database:</label></span> <input type="text" name="newdb">
+<input type=submit value="add"></p>
 </form>
 
+<h2>Manage Data</h2>
+<p>One interface we recommend for managing SQL data is <a href="/~sql/phpMyAdmin/" target="_blank">phpMyAdmin</a>. Feel free to use it after you've created your databases.</p>
+
 <?php
 
 include 'foot.php';
This page took 0.02829 seconds and 4 git commands to generate.