本文整理汇总了PHP中DB_Functions::insert_plant方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_Functions::insert_plant方法的具体用法?PHP DB_Functions::insert_plant怎么用?PHP DB_Functions::insert_plant使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::insert_plant方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$db = new DB_Functions();
if (isset($_POST['plant'])) {
// get tag
$biological_name = $_POST['biological_name'];
$common_name = $_POST['common_name'];
$land_size = $_POST['land_size_required'];
$life_time = $_POST['life_time'];
$irrigation_period = $_POST['irrigation_period'];
$average_plant_size = $_POST['average_plant_size'];
$suitable_season = $_POST['suitable_season'];
$sunlight_hours = $_POST['sunlight_hours'];
$average_temperature = $_POST['average_temperature'];
$humidity = $_POST['humdity'];
$land_id = $_POST['land_id'];
$plant_rate = $_POST['plant_rate'];
$status = $db->insert_plant($biological_name, $common_name, $land_size, $life_time, $irrigation_period, $average_plant_size, $suitable_season, $sunlight_hours, $average_temperature, $humidity, $land_id, $plant_rate);
// if($status!=-1){
// echo 'Inserted Successfully';
// }else{
// echo 'Error in insertion';
// }
}
?>
<html>
<head>
<title>Plant Nursery</title>
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/animate.css" />
<link rel="stylesheet" type="text/css" href="css/custom.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.timepicker.css" />