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


PHP company::insert_company方法代碼示例

本文整理匯總了PHP中company::insert_company方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::insert_company方法的具體用法?PHP company::insert_company怎麽用?PHP company::insert_company使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在company的用法示例。


在下文中一共展示了company::insert_company方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: company

<div class="page-heading">
	<h1>Add Company</h1>
</div>

<div class="form-container">
<?php 
    $company = new company();
    $ID = isset($_GET['id']) ? $_GET['id'] : NULL;
    if (isset($_POST['add_company'])) {
        // Update old record
        if (isset($ID)) {
            $results = $company->update_company($_POST, $ID);
        } else {
            // Insert new
            $results = $company->insert_company($_POST);
        }
        if ($results) {
            echo '<div class="alert alert-success" role="alert">';
            echo isset($_GET['id']) ? 'Updated ' : 'Added ';
            echo 'company Sucessfully </div>';
        } else {
            echo '<div class="alert alert-danger" role="alert"> Error </div>';
        }
    }
    if (isset($ID)) {
        $company_result = $company->get_companies($ID);
    }
    ?>

<form class="form-horizontal" action="" method="post">
開發者ID:qundeel,項目名稱:Restaurant-app,代碼行數:30,代碼來源:add_company.php

示例2: implode

    $company_name = $_POST['company_name'];
    $category = implode(",", $_POST['industry']);
    $company_description = $_POST['company_description'];
    $location = $_POST['location'];
    $country = $_POST['country'];
    $registration_no = $_POST['registration_no'];
    $address = $_POST['address'];
    $first_name = $_POST['first_name'];
    $last_name = $_POST['last_name'];
    $designation = $_POST['designation'];
    $contact_no = '+' . $_POST['code'] . "-" . $_POST['mobile'];
    $type = 2;
    $status = 0;
    include_once "../config/company.php";
    $ob = new company();
    $ob->insert_company($company_name, $category, $company_description, $country, $location, $registration_no, $address, $sales, $first_name, $last_name, $designation, $contact_no, $email, $password, $type, $status);
}
?>
		  </div>
		</div>
	</div>	
	<!--footer-->
	<div class="footer">
		<div class="container">
			<div class="footer-left"></div>
			<div class="footer-right">
				<p>© 2015 All rights reserved | Template by <a href="http://w3layouts.com/"> Salaj</a></p>
			</div>
			<div class="clearfix"> </div>
		</div>
	</div>
開發者ID:salajss,項目名稱:eRecruitment,代碼行數:31,代碼來源:Register_Company.php


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