當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DB_Functions::insert_plant方法代碼示例

本文整理匯總了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" />
開發者ID:shriyanshgautam,項目名稱:plantNursery,代碼行數:31,代碼來源:plant.php


注:本文中的DB_Functions::insert_plant方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。