PHP Classes

File: forms/stage_1.php

Recommend this page to a friend!
  Classes of Bogdan Lupandin   Installation Automation   forms/stage_1.php   Download  
File: forms/stage_1.php
Role: Example script
Content type: text/plain
Description: Stage 1 of the installation automation
Class: Installation Automation
Automate multi-step application installations
Author: By
Last change: Changed how the form is shown. Made it cleaner with tables.
Date: 14 years ago
Size: 2,224 bytes
 

Contents

Class file image Download
<p>The Database Form: Form 1</p>
        <form action="<?=$_SERVER['REQUEST_URI']?>" method="post">
            <table>
                <tr>
                    <td>
                        <label for="host">MySQL Host:</label>
                    </td>
                    <td>
                        <input type="text" size="20" id="host" name="host" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="user">MySQL Username:</label>
                    </td>
                    <td>
                        <input type="text" size="20" id="user" name="user" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="pass">MySQL Password:</label>
                    </td>
                    <td>
                        <input type="password" size="20" id="pass" name="pass" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="dbname">Database Name:</label>
                    </td>
                    <td>
                        <input type="text" size="20" id="dbname" name="dbname" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="tbl_pre">Table Prefix:</label>
                    </td>
                    <td>
                        <input type="text" size="20" id="tbl_pre" name="tbl_pre" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="submit" name="fsubmit" value="Submit" /> <input type="reset" value="Reset" />
                    </td>
                </tr>
            </table>
        </form>
<?php
if(isset($_POST['fsubmit']))
{
   
$inst = new install();
   
   
$inst->set_sql($_POST['host'], $_POST['user'], $_POST['pass'], $_POST['dbname'], $_POST['tbl_pre']);

?>
<form action="<?=$_SERVER['REQUEST_URI']?>" method="post">
<p>
<input type="image" name="submit" value="continue" />
</p></form>
<?php
}
?>