本文整理汇总了PHP中task::connect方法的典型用法代码示例。如果您正苦于以下问题:PHP task::connect方法的具体用法?PHP task::connect怎么用?PHP task::connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::connect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: task
<?php
session_start();
require_once "config.php";
$obj = new task();
$obj->checkUser();
$done = 0;
$cat = new task();
if (isset($_POST["submit"])) {
if ($cat->EditCategory()) {
$done = 1;
}
}
if (isset($_GET["id"])) {
$catid = $_GET["id"];
$cat->connect();
$query = "select * from categories where catid='{$catid}'";
$data = mysqli_query($cat->con, $query);
$row = mysqli_fetch_array($data);
extract($row);
}
require_once "headincludes.php";
?>
<body>
<!-- topbar starts -->
<?php
require_once "topbar.php";
?>
<!-- topbar ends -->
<div class="container-fluid">
<div class="row-fluid">
示例2: task
<?php
session_start();
require_once "config.php";
$obj = new task();
$obj->checkUser();
$obj->connect();
$bid = $_GET["id"];
$query = "update brands set status='0' where bid='{$bid}'";
mysqli_query($obj->con, $query);
header("location:brands.php");
示例3: extract
<fieldset>
<legend><h3 style="color:red;">Details</h3></legend>
<div class="control-group">
<label class="control-label" for="focusedInput">Name</label>
<div class="controls">
<input name="name" class="input-xlarge focused" id="focusedInput" type="text" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">Under Category</label>
<div class="controls">
<select name="catid" id="selectError3">
<option value="">Select</option>
<?php
$query = "select * from categories order by name";
$client->connect();
$data = $client->query($query);
while ($row = mysqli_fetch_assoc($data)) {
extract($row);
echo "<option value='{$catid}'>{$name}</option>";
}
?>
</select>
</div>
</div>
<div class="form-actions">
<button type="submit" name="submit" class="btn btn-primary">Add Now</button>
<button class="btn"><a href="subcategories.php">Cancel</a></button>
</div>
</fieldset>
</form>
示例4:
<div class="control-group">
<label class="control-label" for="price">Price</label>
<div class="controls">
<input class="input-xlarge focused" style="height:28;" name="price" id="price" type="text" value="<?php
echo $price;
?>
" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">Under Category</label>
<div class="controls">
<select name="catid" id="select1" >
<?php
$query = "select * from categories order by name";
$obj1->connect();
$data = $obj1->query($query);
while ($row1 = mysqli_fetch_assoc($data)) {
?>
<option value='<?php
echo $row1['catid'];
?>
' <?php
if ($cid == $row1['catid']) {
echo "selected";
}
?>
><?php
echo $row1['name'];
?>
</option>";