<?php include "../../../system.php"; include "../../system.php"; include "../../../function/new_function.php"; include "size_unit.php"; //System----------------------------------------------------------- $now_table = $pro_size_table; //System----------------------------------------------------------- $tool = new My_Tool(); $sam = new guard(); $unit = new size(); $name = trim($_POST['name']); $sql = "select * from `{$now_table}` where `name`='{$name}'"; $res = mysql_query($sql); if (mysql_num_rows($res) == 0) { if (!empty($name)) { $unit->table = $now_table; $unit->name = $name; $unit->add(); } }