本文整理匯總了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" />