11-26-2016, 05:29 PM
Now I need to select infomation base on login username like count total script:
<pre></pre>
how can I do this in us_helpers.php ?
Here is the form, where all info will go,
<ul class="to_do">
<?php
//Cycle through users
foreach ($TaskData as $v1) {
?>
<a>id?>">
<li class="list-group-item flat ">
<input type="checkbox" class="list-group-item flat " name="update<?=$v1->id?>" value="<?=$v1->id?>" > <font color="<?=$v1->color?>"><i class="fa fa-circle"></i></font> <?=$v1->titlu?><span class="badge"><?=$v1->utilizator?> </span>
</li>
</a>
<?php } ?>
</ul>
<pre>
Code:
//Retrieve information for all users
function fetchAllTask() {
$db = DB::getInstance();
$query = $db->query("SELECT * FROM task WHERE utilizator = ? ",array($utilizator));
$results = $query->results();
return ($results);
}
how can I do this in us_helpers.php ?
Here is the form, where all info will go,
<ul class="to_do">
<?php
//Cycle through users
foreach ($TaskData as $v1) {
?>
<a>id?>">
<li class="list-group-item flat ">
<input type="checkbox" class="list-group-item flat " name="update<?=$v1->id?>" value="<?=$v1->id?>" > <font color="<?=$v1->color?>"><i class="fa fa-circle"></i></font> <?=$v1->titlu?><span class="badge"><?=$v1->utilizator?> </span>
</li>
</a>
<?php } ?>
</ul>