Example #1
0
 function __construct($ter)
 {
     parent::__construct();
     require_once 'connexio.php';
     $bd = new connexio();
     $bd->query("INSERT INTO territori (territori) VALUES ('" . utf8_decode($ter) . "')");
     $bd->close();
 }
Example #2
0
        <div class="tab-pane col-md-6 col-md-offset-3" id="territoris">
            <table class="table table-striped">
                <thead>
                  <tr>
                    <th>ID</th>
                    <th><?php 
    echo $lang['TERRITORY'];
    ?>
</th>
                    <th></th><th></th>
                  </tr>
                </thead>
                <tbody id="llistatter">
                    <?php 
    include_once '../classes/territoris.php';
    $territoris = new territoris();
    $territoris->llistar();
    ?>
                    <tr>
                        <td></td>
                        <td><input type="text" class="form-control" name="territori" id="territori" placeholder="<?php 
    echo $lang['NEW_TERRITORY'];
    ?>
"></td>
                        <td><button type="button" class="btn btn-success btn-xs" onclick="insertter();"><span class="glyphicon glyphicon-plus"></span> <?php 
    echo $lang['INSERT'];
    ?>
</button></td>
                        <td></td>
                    </tr>
                </tbody>