database_wizard.php
\file \brief Create / Edit database connection
Call: database_wizard.php
PHP version 8.1
Tags
Table of Contents
Classes
- Database_Connection
- A connection to database stored as an object.
Functions
- writeToFile() : void
- Save the connection to the file connect.inc.php.
- doOperation() : void
- Execute operation.
- displayForm() : void
- Generate a form to edit the connection.
- editConnection() : void
- Display the main form, filled with data from an existing connection file.
- createNewConnection() : void
- Display the main form blank.
Functions
writeToFile()
Save the connection to the file connect.inc.php.
writeToFile(Database_Connection $conn) : void
Parameters
- $conn : Database_Connection
-
Connection object.
doOperation()
Execute operation.
doOperation(string $op) : void
Parameters
- $op : string
-
Operation to execute.
displayForm()
Generate a form to edit the connection.
displayForm(Database_Connection $conn[, string|null $error_message = null ]) : void
Parameters
- $conn : Database_Connection
-
Database connection object
- $error_message : string|null = null
-
Error message to display
editConnection()
Display the main form, filled with data from an existing connection file.
editConnection() : void
createNewConnection()
Display the main form blank.
createNewConnection() : void