当前位置: 首页>>代码示例>>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;未经允许,请勿转载。