コード例 #1
0
ファイル: add.php プロジェクト: jcandrew1966/as_woodhouse
<?php

header("Content-Type:text/html;charset=UTF-8");
include "../../../system.php";
include "../../system.php";
include "../../../gd.php";
include "../../../function/new_function.php";
include "color_unit.php";
//System-----------------------------------------------------------
$now_table = $pro_color_table;
//System-----------------------------------------------------------
$sam = new guard();
$unit = new color();
$name = trim($_POST['name']);
//START DB Write In-------------------------------------------------------------------
$sql = "select * from `{$now_table}` where `name`='{$name}'";
$res = mysql_query($sql);
if (mysql_num_rows($res) == 0) {
    $unit->table = $now_table;
    $unit->name = $name;
    if (!empty($name)) {
        $unit->add();
    }
}