Location: PHPKode > scripts > MySQL/HTML-Client > mysqlhtml-client/modules/login.inc.php
<table border="0" width="750" align="left" cellspacing="2" cellpadding="0">
    <?php
        if (sizeof($cfg_host) > 1) 
        {
            echo "<tr>";
            echo "<th align=\"right\" class=\"white\"><b>Hosts:</b>&nbsp;</th>";
            echo "<td>\n";      
            echo "<select name=\"conn\" onChange=\"submit()\">\n";
            for ($i = 0; $i < sizeof($cfg_host); $i++) {
                echo "<option value=\"" . $i . "\"" . (($conn == $i) ? " selected" : "") . ">" . $cfg_host[$i];
            }
            echo "</select>\n";
            echo "</td>";
            echo "</tr>\n";
        }
        
        if (!$host)
            echo "<tr><th align=\"right\" class=\"white\">Host:&nbsp;</th><td><input type=\"text\" name=\"host\" value=\"" . $host . "\"></td></tr>\n";
        
        if (!$user) 
        {
            echo "<tr><th align=\"right\" class=\"white\">User:&nbsp;</th><td><input type=\"text\" name=\"user\" value=\"" . $user ."\"></td></tr>\n";
        } 
        else 
        {
            echo "<tr><th align=\"right\" class=\"white\"><b>Userstatus:</b>&nbsp;</th><td class=\"white\"><b>" . $user . "</b><input type=\"hidden\" name=\"user\" value=\"" . $user . "\"></td></tr>\n";
        }
        
        if (!$password) 
        {
            echo "<tr><th align=\"right\" class=\"white\">Password:&nbsp;</th><td colspan=\"2\"><input type=\"password\" name=\"password\" value=\"" . $password ."\"></td></tr>\n";      
        }
        
        if ($onlydatabase[$conn]) 
        {
            $database = $onlydatabase[$conn];           
            echo "<tr><th align=\"right\" class=\"white\">Database:&nbsp;</th><th align=\"left\" class=\"white\"><b>" . $database . "</b>&nbsp;<input type=\"button\" class=\"button\" name=\"mysql list tables\" value=\"mysql list tables\" onClick=\"promptMyAction(this.value, 0)\"></th></tr>\n";
        } 
        else 
        {
            if ($mysql_list == "mysql list dbs") 
            {
                $result = @mysql_list_dbs($db_link) or mysql_client_error_msg($query_text, __FILE__, __LINE__);
                echo "<tr>";
                echo "<th align=\"right\" class=\"white\">Database:&nbsp;</th>\n";
                echo "<td align=\"left\">";
                echo "<select name=\"database\">\n";                
                while ($list_dbs = mysql_fetch_array($result, MYSQL_NUM)) 
                {
                    echo "<option value=\"" . $list_dbs[0] . "\"" . (($database == $list_dbs[0]) ? " selected" : "") . ">" . $list_dbs[0] . "\n";
                }
                echo "</select>&nbsp;<input type=\"button\" class=\"button\" name=\"mysql list tables\" value=\"mysql list tables\" onClick=\"promptMyAction(this.value, 0)\">&nbsp;<input type=\"button\" class=\"button\" name=\"myaction\" value=\"admin dbs\" onClick=\"promptMyAction(this.value, 0)\"></td></tr>\n";                
            }
            else 
            {
                echo "<tr><th align=\"right\" class=\"white\">Database:&nbsp;</th><td><input type=\"text\" name=\"database\" value=\"" . $database . "\">&nbsp;<input type=\"button\" class=\"button\" name=\"mysql list dbs\" value=\"mysql list dbs\" onClick=\"promptMyAction(this.value, 0)\">" . ($database ? "&nbsp;<input type=\"button\" class=\"button\" name=\"mysql list tables\" value=\"mysql list tables\" onClick=\"promptMyAction(this.value, 0)\">" : "") . "&nbsp;<input type=\"button\" class=\"button\" name=\"myaction\" value=\"admin dbs\" onClick=\"promptMyAction(this.value, 0)\"></td></tr>\n";
            }
        }
    
        if ($mysql_list == "mysql list tables") 
        {
            $result = mysql_list_tables($database, $db_link) or mysql_client_error_msg($query_text, __FILE__, __LINE__);
            echo "<tr>";
            echo "<th align=\"right\" class=\"white\">Table:&nbsp;</th>\n";
            echo "<td align=\"left\">";
            echo "<select name=\"table\" onChange=\"this.document.clientform.query_text.value='SELECT * FROM ' + this.value;\">\n";            
            while ($list_tables = mysql_fetch_array($result, MYSQL_NUM)) 
            {
                echo "<option value=\"" . $list_tables[0] . "\"" . (($table == $list_tables[0]) ? " selected" : "") . ">" . $list_tables[0] . "\n";
            }
            echo "</select></td></tr>\n";            
        }
        else 
        {
    ?>
            <tr><th align="right" class="white">Table:&nbsp;</th><th align="left" class="white"><input type="text" name="table" value="<?php echo $table ?>">&nbsp;<input type="button" class="button" name="myaction" value="create new table" onClick="promptMyAction(this.value, 1, 'Please enter number of fields you would like to have in your table first!')">&nbsp;with&nbsp;<input type="text" name="fields" size="2"> fields</td></tr>
    <?php
        }   
    ?>    
    <tr>
        <th align="right" class="white">MySQL-Query:&nbsp;</th>
        <td><input type="text" size="80" name="query_text" value=""></td>
    </tr>
    <tr>
        <td align="right">&nbsp;</td><td align="right" class="white"><b>LIMIT</b> ([Offset,] Rows)</font> <input type="text" name="limit" size="10"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td align="left">
            <input type="button" class="button" name="myaction" value="send query" onClick="promptMyAction(this.value, 0)">&nbsp;<input <?php echo $style2; ?> type="checkbox" name="detailedview"<?php echo (($detailedview) ? " checked" : ""); ?>><font class="whitesmall">[detailed]</font>
        </td>
    </tr>
</table><br clear="all">
Return current item: MySQL/HTML-Client