(c) Faktiva (http://faktiva.com) NOTICE OF LICENSE This source file is subject to the CC BY-SA 4.0 license that is available at the URL https://creativecommons.org/licenses/by-sa/4.0/ DISCLAIMER This code is provided as is without any warranty. No promise of being safe or secure
Author: Emiliano 'AlberT' Gabrielli (albert@faktiva.com)
Inheritance: extends ManufacturerControllerCore
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>Remove a manufacturer<small> from the system </small></h5>
                    </div>
                    <div class="ibox-content">
                        <form method="post" class="form-horizontal" action="php/DeleteManufacturer.php">

                            <div class="form-group"><label class="col-sm-2 control-label">Select Manufacturer</label>
                                <div class="col-sm-10">
                                    <select class="form-control m-b" name="manufacturer">
                                        <option selected disabled>- Select a manufacturer -</option>
                                        <?php 
$manufacturerController = new ManufacturerController();
$manufacturers = $manufacturerController->selectAll();
foreach ($manufacturers as $manufacturer) {
    echo '<option value="' . $manufacturer->getIdmanufacturer() . '">' . $manufacturer->getManufacturerName() . '</option>';
}
?>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <a class="btn btn-white" type="submit">Cancel</a>
                                    <input type="submit" class="btn btn-primary" value="Delete">
                                </div>
                            </div>
<?php

include "../LoadClass.php";
/**
 * Created by PhpStorm.
 * User: User
 * Date: 1/21/2016
 * Time: 5:13 AM
 */
$id = $_POST['manufacturer'];
$manufacturerController = new ManufacturerController();
$manufacturerController->removeManufacturerById($id);
header('Location: ../edit_manufacturer.php');