Sohag Developer PostgreSQL Database Applications

Build Powerful Robust Database Applications

add.php


<!-- 
** GENERATED BY SOHAG DEVELOPER
** Visit Us: http://sohag-developer.com/
-->
<?php
     
    require '../conf/database.php';
 
    if ( !empty($_POST)) {
*postVariables*        
            $pdo = Database::connect();
            $sql = "INSERT INTO *tabelName* (*columnsListSperatedByComma*) values(*insertPlaceHolders*)";
            $q = $pdo->prepare($sql);
            $q->execute(array(*editBinding*));
            header("Location: index.php");
    }

require '../templates/header.php';
?>
    <div class="container">

                <div>
                    <div class="row">
                        <h3>Add *className*</h3>
                    </div>
             
                    <form class="form-horizontal" action="add.php" method="post">

*addData*

                     <div class="form-group row">
                        <div class="col-sm-2">
                        </div>
		      <div class="col-sm-10">
                          <button type="submit" class="btn btn-success">Add</button>
                          <a class="btn btn-primary" href="index.php">Back</a>
                        </div>
                    </form>
                </div>
                 
    </div> <!-- /container -->
<?php
require '../templates/footer.php';
?>