本文整理汇总了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">
示例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>