本文整理汇总了PHP中company::update_company方法的典型用法代码示例。如果您正苦于以下问题:PHP company::update_company方法的具体用法?PHP company::update_company怎么用?PHP company::update_company使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类company
的用法示例。
在下文中一共展示了company::update_company方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: company
<li><a href="view_company.php">Companies</a></li>
<li><a class="active" href="#" >Add</a></li>
</ul>
<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);
}
示例2: company
</div>
<p style="text-align:center"><input name="submit" type="submit" value="Submit"/></p>
</form>
</div>
</p>
</div>
<?php
if (isset($_POST['submit'])) {
$company_id = $_SESSION['userid'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$designation = $_POST['designation'];
$contact_no = '+' . $_POST['code'] . "-" . $_POST['mobile'];
include_once "../config/company.php";
$ob = new company();
$ob->update_company($first_name, $last_name, $designation, $contact_no, $company_id);
echo '<script>window.location="manage_profile.php"</script>';
}
?>
</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>