Specific column field Search implementation in Codeigniter - php

I have been having a bug in my code for the past weeks, I have tried all sorts of ways but can't get it to work, I am trying to implement a specific column field search functionality in codeigniter. Here is my scenario, a user lands on the age, and decides to search for a list of people, by name, member affiliation and location. here's my controller, model and view respectively...
model:
function get_advanced($address2,$partners,$typeofirm){
echo $address2,$partners,$typeofirm;
$query = "SELECT firm_id,address2,partners,typeofirm FROM auditfirms WHERE address2 LIKE '%$address2%' OR partners LIKE '%$partners%' OR typeofirm LIKE '%$typeofirm%' ORDER BY 'firm_id' LIMIT 10";
// return print_r(json_encode($query->result_array()));
$adv = $this->db->query($query)->result_array();
if ($query->num_rows() > 0){
$row = $query->row_array();
echo $query;
var_dump($adv); die();
return $adv;
}
else{
echo 'Error at syntax';
}
controller
function advanced(){
$this->load->library('pagination');
$config['base_url'] = 'http://localhost/icpak/index.php/firms/search';
$config['total_rows'] = $this->db->get('auditfirms')->num_rows();
$query1 = $config['per_page'] = 10;
$query2 = $config['uri_segment'] = 3;
$config['num_links'] = 5;
$config['full_tag_open'] = '';
$config['full_tag_close'] = '';
$config['cur_tag_open'] = '<span class="current_page">';
$config['cur_tag_close'] = '</span>';
$config['anchor_class'] = 'class="btn btn-default" ';
$this->pagination->initialize($config);
$address2 = $this->input->post('address2');
$partners = $this->input->post('partners');
$typeofirm = $this->input->post('typeofirm');
$data['advanced'] = $this->firms_model->get_advanced($address2,$partners,$typeofirm);
$this->load->view('index/advanced', $data);
}
view: is a modal window on which the form sits on...
<!--Modal-1-->
<div class="modal fade" id="myModal-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h3 class="modal-title">Advanced Search</h3>
</div>
<div class="modal-body" style="padding:0px; margin:0 auto; ">
<div class="col-md-12" style="padding:30px !important; margin:0 auto;">
<!-- <form id="contactForm" class="contact"> -->
<?php echo form_open_multipart('firms/advanced', array('id' => 'contactForm', 'class' => 'contact'));?>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">Location</label>
<div class="col-sm-8">
<input class="form-control mb15" type="input" name="address2" placeholder="Search by Location" aria-controls="firms" />
</div>
</div><br><br>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">Members</label>
<div class="col-sm-8">
<input class="form-control mb15" type="input" name="partners" placeholder="Search by Member" aria-controls="firms" />
</div>
</div><br><br>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">Type of Firm</label>
<div class="col-sm-8">
<select class="form-control mb15" name="typeofirm" placeholder="Search by Type of Firm">
<option value="Auditing">Auditing</option>
<option value="NULL">Null</option>
</select>
</div>
</div><br><br>
</div>
<div class="row">
<div class="form-group">
<button class="btn btn-primary" id="submit">Submit</button>
<button type="reset" class="btn btn-reset">Reset</button>
</div>
</div>
<!-- </form> -->
<?php echo form_close();?>
</div>
</div> <!-- col-md-12 -->
</div> <!-- modal-body -->
</div> <!-- modal content -->
</div> <!-- modal-dialog -->
</div> <!-- modal fade -->
<!--End -Modal-1-->
Thank you in advance...

There is problem with your $query. Please see comment in code.
function get_advanced($address2,$partners,$typeofirm){
echo $address2,$partners,$typeofirm;
$query = "SELECT firm_id,address2,partners,typeofirm FROM auditfirms WHERE address2 LIKE '%$address2%' OR partners LIKE '%$partners%' OR typeofirm LIKE '%$typeofirm%' ORDER BY 'firm_id' LIMIT 10";
// return print_r(json_encode($query->result_array()));
$adv = $this->db->query($query)->result_array();
// $query is string.. so at this point you must get error.
// if ($query->num_rows() > 0){
if (count($adv) > 0){
// $row variable is unused. but it will give you first record.
$row = $adv[0];
return $adv;
}
else{
echo 'Error at syntax';
}
}

Related

jquery submit form how to make other page

When I query from a page, I submit the form with jquery in sorgu.php. but how do i do it without making it infinite loop?
is there any other way ?
page link
header.php code search mod
<div class="modal fade" id="srcModal" tabindex="-1" role="dialog" aria-labelledby="contacthModal">
<div class="row searchArea modal-dialog modal-content" role="document">
<div class="container ">
<div class="row searchCloserow">
<div class="closeBtn" data-dismiss="modal"> <i class="fas fa-times" aria-hidden="true"></i> Kapat </div>
</div>
<div class="row searchForm d-flex justify-content-center">
<div class="col-md-2 searchText">
<span id="myModalLabel">Sipariş Sorgulama Ekranı</span>
<p>Sorgulamak istediğiniz siparişin kodunu giriniz!</p>
</div>
<div class="col-md-4 searchwell">
<input type="text" name="siparis_key" id="siparis_key" placeholder="Lütfen Sipariş Kodunu Giriniz">
</div>
<div class="col-md-2">
<a href="sorgu" id="siparis_Sorgula" type="submit" class="searchbtn anibut">
Sipariş Sorgula <i class="fas fa-question" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
</div>
and header.php jquery code. here i am changing the href href="sorgu?key=asdasdasd"
$("#siparis_Sorgula").click(function(){
$data = $('#siparis_key').val();
$href = $("#siparis_Sorgula").attr('href');
$href = $href+"?key="+$data;
$("#siparis_Sorgula").attr("href", $href);
});
sorgu.php page code
<form action="" method="post" id="jsSorgula">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="form-group">
<input type="text" name="siparis_key" id="siparis_keyId" placeholder="<?php echo $dil['sipariskodu'] ?>" class="form-control" required>
</div>
</div>
<div class="col-lg-12 col-md-12">
<button type="submit" class="btn btn-primary btn-block"><?php echo $dil['sorgula'] ?></button>
</div>
</div>
</form>
sorgu.php jquery code
<script type="text/javascript">
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
$count = 0;
$(document).ready(function(){
if ($count==0) {
$keys = getUrlVars()["key"];
$('#siparis_keyId').val($keys);
$("#jsSorgula").submit();
$count++;
alert($count);
}
break;
});
The infinity loop could came from your $count = 0. Is set to 0 each time you make a request on that page. Instead of make the validation with count == 0, you should use a method like "on click" or "on change".

Get a value inside a modal PHP HTML

This is my code, i was supposed to get the "$pw" outside the modal.. But it seems that i can't get the value of it and Also i can't seem to fetch the "$errMSG" value.. If it's if($pin != $pww) cant get the err MESSAGE.. Really need some help.. Thank you!
This is my "$pw" code, its on the same page as my modal..
<?php
include('connectdb.php');
$sql = "SELECT * FROM accounts WHERE usernamee='$userid'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($data = $result->fetch_assoc()) {
$pww = $data['passwordd'];
}
}
?>
This is my modal code:
<div class="container">
<form method="post">
<h2>Enter your Pin Number</h2>
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Enter your Pin Number</h4>
</div>
<div class="modal-body text-center">
<input type="password" id="first-name" required="required" class="form-control" name="pin">
<?php
if(isset($errMSG)){
?>
<div class="alert alert-danger">
<span class="glyphicon glyphicon-infos-sign"></span> <strong><?php echo $errMSG; ?></strong>
</div>
<?php
}
else if(isset($successMSG)){
?>
<div class="alert alert-success">
<strong><span class="glyphicon glyphicon-info-sign"></span> <?php echo $successMSG; ?></strong>
</div>
<?php
}
?>
</div>
<div class="modal-footer">
<button type="submit" name="submit3" class="btn btn-default"><i class="fa fa-key"></i> Confirm Pin</button>
</div>
</div>
</div>
</div>
<!-- START OF PHP -->
<?php include ('connectdb.php');
if(isset($_POST['submit3']))
{
$pin = $_POST["pin"];
if ($pin != $pww) {
$errMSG= "WRONG PIN.. TRY AGAIN..";
}
else{
header('Location: myorders.php');
}
} // SUBMIT
?>
</form>
</div>
include('connectdb.php');
$pww = '';
$sql = "SELECT * FROM accounts WHERE usernamee='$userid'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($data = $result->fetch_assoc()) {
$pww = $data['passwordd'];
}
}
Try this code, You should declare pww before your if or while brackets, to get acces to this variable.

unable to display database content into specified field

i am trying to create e-commerce website. neither it is showing error not providing coding result. trying to develop popup modal it is not showing results, modal popup is appearing but the echo codes which were put to retrieve database table value, for example this command is not working. how to find mistake?
<!-- The Modal -->
<?php
require_once '../core/init.php';
<!--this code is to retreive data from database thelewala and table products-->
$id = $_post['id'];
$id = (int)$id;
$sql = "SELECT * FROM products WHERE id = '$id'";
$result = $db->query($sql);
$product = mysqli_fetch_assoc($result);
<!-- this code is to retrieve data from database thelewala and table brand-->
$brand_id = $product['brand'];
$sql = "SELECT brand FROM brand WHERE id = '$brand_id'";
$brand_query = $db->query($sql);
$brand = mysqli_fetch_assoc($brand_query);
?>
<?php ob_start(); ?>
<div class="modal fade" id="details-modal">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title"><?php echo $product['title']; ?></h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<div>
<img src="<?php echo $product['image']; ?>" alt="<?php echo $product['title']; ?>'" class="details img.responsive" />
</div>
</div>
<div class="col-sm-6">
<h4>Details</h4>
<p><?php echo $product['discription']; ?></p>
<hr />
<p>Price : Rs. <?php echo $product['price']; ?></p>
<p>Brand : <?php echo $brand['brand']; ?></p>
<form action="add_card.php" method="post">
<div class="form-group">
<div class="col-xs-3">
<lable for="quantity">Quantity</lable>
<input type="text" class="form-control" id="quantity" name="quantity" />
</div>
</div>
<div class="form-group">
<lable for="size">Size</lable>
<select name="size" id="size" class="form-control">
<option value=""></option>
<option value="32">32</option>
<option value="36">36</option>
<option value="XL">XL</option>
</select>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-warning" <span class="glyphicon glyphicon-shopping-cart"></spa>Add to Cart</button>
</div>
</div>
</div>
</div>
<?php echo ob_get_clean(); ?>

Using AJAX for passing form inputs in CodeIgniter

I'm a newbie in CodeIgniter and I'm trying to pass my form inputs from the view to the controller. I was able to pass it, and was able to insert it on the database. However, I want to use Ajax for this so the whole page won't reload when I press the submit button. I have watched and tried this youtube tutorial: https://www.youtube.com/watch?v=IURutxKvukA, but it doesn't work for me. :( Thank you in advance!
This is my controller, Teacher.php
public function insert_quiz($quiztitle, $quizdescription, $value="")
{
$data = $this->input->post();
$numData = count($data);
$response = array();
$stringChoices = "";
if($numData > 1)
{
for ($i=4; $i < $numData; $i++)
{
$num = $i-3;
$offset = "inputChoice$num";
if ($i == 4)
{
$stringChoices = $data[$offset];
}
else if ($i != 4)
{
$stringChoices = $stringChoices . "," . $data[$offset];
}
}
}
$quizitems = array('Question' => $data['inputQuestion'], 'Choices' => $stringChoices, 'Correct' => $data['correctanswer'], 'NumSequence' => $data['questionnumber']);
$quizitemid = $this->Teacher_model->insertQuizItemOnQuizItems($quizitems);
if (count($quizitemid) == 1)
{
$quizdeedid = $this->Teacher_model->getQuizDeedId($quiztitle);
$quizdatasetitem = array('QuizSet' => $data['quizsetnumber'], 'QuizItemID' => $quizitemid, 'QuizDeedID' => $quizdeedid);
$quizdatasetid = $this->Teacher_model->insertQuizOnQuizDataSet($quizdatasetitem);
if(count($quizdatasetid) == 1)
{
$response = array(
'status' => "success"
);
echo json_encode($response);
}
}
}
and this is my quiz form, in quizView.php
<div class="container-fluid container-cards-pf container-pf-nav-pf-vertical
nav-pf-persistent-secondary">
<div class="row row-cards-pf">
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="card-pf">
<div class="card-pf-heading">
<h1 align="center">
<strong><?php echo str_replace("%20", " ", $quizTitle); ?></strong>
</h1>
<h2 class="card-pf-title" align="center">
<label><?php echo str_replace("%20", " ", $quizDescription); ?></label>
</h2>
</div>
<div class="card-pf-body" id="divquizset" style="height: 50px">
<div class="col-sm-2">
</div>
<div class="col-sm-9" id="divquizset">
<div class="col-sm-3">
<p align="right"> QUIZ SET: </p>
</div>
<div class="col-sm-4">
<input align="center" type="text" id="quizset" class="form-control"></input>
</div>
<button class="btn btn-default col-sm-2" align="left" onclick="saveQuizSet()">Save</button>
</div>
<div class="col-sm-1">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="container">
<div class="col-sm-12">
<div id="status">
</div>
</div>
</div>
</div>
<div class="container-fluid container-cards-pf container-pf-nav-pf-vertical
nav-pf-persistent-secondary" id="list1" style="padding-top: 0px">
<!-- LIST VIEW PART 1 -->
<div id = "div1" style="padding-top: 0px">
<?php echo form_open("Teacher/insert_quiz/$quizTitle/$quizDescription", "id='myForm'", $hidden= array()); ?>
<div>
<div class="list-group list-view-pf list-view-pf-view">
<div class="list-group-item">
<div class="list-group-item-header" id="div2">
<div class="list-view-pf-expand">
<span class="fa fa-angle-right"></span>
</div>
<div class="list-view-pf-checkbox">
<input type="text" name="questionnumber" id="inputquestionnumber1" class="form-control">
<!-- <b id="questionnumber" name="questionlabel" for="inputQuestion">Question 1: </b> -->
<input type="hidden" name="quizsetnumber" id="quizsetnum" class="form-control" value="">
</div>
<div class="list-view-pf-actions">
<?php echo form_submit('submit', 'Save', $attributes=array("class" => "btn btn-default")); ?>
<!-- <button class="btn btn-default" style="width: 100px">Save</button> -->
<button class="btn btn-default" style="width: 100px">Edit</button>
<button class="btn btn-default" style="width: 100px">Delete</button>
</div>
<div class="list-view-pf-main-info">
<div class="list-view-pf-body">
<div class="list-view-pf-description">
<div class="list-group-item-text form-group">
<input type="text" name="inputQuestion" id="input1" class="form-control">
</div>
</div>
</div>
</div>
</div>
<div class="list-group-item-container container-fluid hidden" id="containerDiv">
<div class="close">
<span class="pficon pficon-close"></span>
</div>
<div class="row">
<!-- LIST VIEW SUB VIEW -->
<div class="col-md-12">
<form class="form-horizontal" style="padding-left: 100px">
<div class="form-group">
<div class="col-sm-7" align="center">
<dt> CHOICES </dt>
</div>
<div class="col-sm-5" align="center">
<dt> CORRECT ANSWER </dt>
</div>
<div class="col-sm-7">
<div id="divCorrect" style="padding-top: 10px">
<input type="text" name="correctanswer" id="inputcorrectanswer1" class="form-control">
</div>
</div>
<div class="col-sm-5" id="divChoiceContainer1">
<div id="divChoice" style="padding-top: 10px">
<input type="text" name="inputChoice1" id="inpChoice1" class="form-control">
</div>
</div>
<div class="col-sm-7" id="otherDivChoiceContainer1">
</div>
<div class="col-sm-7" align="center" style="padding-top: 20px">
<button type="button" class="btn btn-primary btn-lg btn-block col-xs-9" id = "1" align="center" onclick="addChoiceFunction(this.id)" >Add Choices</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?= form_close() ?>
</form>
</div>
</div>
</div>
<div class="col-sm-3 container-fluid container-cards-pf container-pf-nav-pf-vertical nav-pf-persistent-secondary">
<button type="button" class="btn btn-primary btn-lg btn-block col-md-9" align="center" onclick="addQuestionFunction()">Add Question</button>
</div>
These are the scripts I used, they're also in the quizView.php:
<script>
jQuery(document).ready(function($) {
$('#myForm').ajaxForm({
beforeSubmit: function(formData, jqForm, options){
$("div#status").html('');
},
success: function(response){
var result = $.parseJSON(response);
$("div#status").html('<div class="alert alert-' + result.status + '" role="alert"> HI </div>');
}
});
});
</script>
<script>
$(document).ready(function () {
// click the list-view heading then expand a row
$(".list-group-item-header").click(function(event){
if(!$(event.target).is("button, a, input, .fa-ellipsis-v")){
$(this).find(".fa-angle-right").toggleClass("fa-angle-down")
.end().parent().toggleClass("list-view-pf-expand-active")
.find(".list-group-item-container").toggleClass("hidden");
} else {
}
})
// click the close button, hide the expand row and remove the active status
$(".list-group-item-container .close").on("click", function (){
$(this).parent().addClass("hidden")
.parent().removeClass("list-view-pf-expand-active")
.find(".fa-angle-right").removeClass("fa-angle-down");
})
});
</script>
<script>
function addQuestionFunction() {
$num = $('div .list-view-pf-view').length + 1;
$divId = "#" + $num;
$toClone = $('#div1').clone(true).find("input").val("").end();
$($toClone).find("#containerDiv").addClass("hidden").end();
$($toClone).find("#otherDivChoiceContainer1").attr("id", "otherDivChoiceContainer"+ $num);
$($toClone).find("#otherDivChoiceContainer" + $num).find("#divChoice").remove().end();
$($toClone).find("#1").attr("id", $num);
$($toClone).find("#questionnumber").text("Question " + $num + ": ");
if($($toClone).find("span").hasClass("fa-angle-down")) {
$($toClone).find(".fa-angle-right").removeClass("fa-angle-down").end();
}
$('#list1').append($toClone);
}
function addChoiceFunction(clicked_id) {
$num = parseInt(clicked_id);
$divId = "#otherDivChoiceContainer" + $num;
$numChoice = $($divId + " input").length + 2;
$toClone = $('#divChoice').clone(true).find("input").val("").end();
$toClone.find("#inpChoice1").attr("id", "inpChoice" + $numChoice).attr("name", "inputChoice" + $numChoice);
// $toClone.find("#inpChoice" + $num).attr("name", $("#inpChoice"+$num).attr("name").replace(/\\[\d+\\]/,"inputChoice" + $num));
//alert($numChoice);
$($divId).append($($toClone));
}
function saveQuizSet() {
$('#quizsetnum').val($('#quizset').val());
$quizsetval = $('#quizset').val();
$('#divquizset').empty();
$('#divquizset').append(' <p align="center"> QUIZ SET: '+ $quizsetval + '</p>');
// $('#divquizset').append(" <p align="center"> QUIZ SET: A </p>");
}
</script>
And for my script sources I used these:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://malsup.github.io/jquery.form.js"></script>
<script src="http://www.patternfly.org/components/jquery/dist/jquery.min.js"></script>
<script src="http://www.patternfly.org/components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="http://www.patternfly.org/components/patternfly-bootstrap-combobox/js/bootstrap-combobox.js"></script>
<script src="http://www.patternfly.org/components/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"></script>
<script src="http://www.patternfly.org/components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<script src="http://www.patternfly.org/components/d3/d3.min.js"></script>
<script src="http://www.patternfly.org/components/c3/c3.min.js"></script>
<script src="http://www.patternfly.org/components/datatables/media/js/jquery.dataTables.js"></script>
<script src="http://www.patternfly.org/components/google-code-prettify/bin/prettify.min.js"></script>
<script src="http://www.patternfly.org/components/clipboard/dist/clipboard.min.js"></script>
<script src="http://www.patternfly.org/components/patternfly/dist/js/patternfly.min.js"></script>
<script src="http://www.patternfly.org/components/jquery-match-height/dist/jquery.matchHeight-min.js"></script>
<script src="http://www.patternfly.org/assets/js/patternfly-site.min.js"></script>
<link rel="canonical" href="http://www.patternfly.org/pattern-library/navigation/vertical-navigation/vertical-navigation.html">
This is what my form looks like
quizviewform
And this is what it's returning
returnpage
It's inserting on my database, but it doesn't return on the page and ajax doesn't work. :( I hope someone can help me here. Thanks!

Search query shows all results when clicking search button

I got a simple search query that works, but shows all results when the search button is clicked without a search input.
It also shows results with parent_id 26 or cattid 26 which I want to prevent in my query. Why is it still showing results with those id's and how can I prevent every result appearing on the result page when there is no search input?
How it is build:
HTML:
<li>
<div class="mn-wrap">
<form method="post" class="form" action="zoeken/">
<div class="search-wrap">
<button class="search-button animate" type="submit" title="Start zoeken">
<i class="fa fa-search"></i>
</button>
<input type="text" name="zoekterm" class="form-control search-field" placeholder="Zoek...">
</div>
</form>
</div>
</li>
.htaccess:
RewriteRule ^zoeken/ /zoeken.php?zoeken=1 [L]
Queries:
if ($_GET['zoeken'] != '') {
$zoekterm = $_POST['zoekterm'];
// zoeken
$zoeken = "SELECT * FROM `lb_content` WHERE catid NOT IN ('1', '26', '27', '28') and introtext LIKE '%".$conn->real_escape_string($zoekterm)."%' OR title LIKE '%".$conn->real_escape_string($zoekterm)."%'";
$zoekencon = $conn->query($zoeken);
$zoekeni = array();
while ($zoekeni[] = $zoekencon->fetch_array());
// zoeken c
$zoekc = "SELECT * FROM `lb_categories` WHERE parent_id NOT IN ('1', '26', '27', '28') and level = 2 and description LIKE '%".$conn->real_escape_string($zoekterm)."%' OR title LIKE '%".$conn->real_escape_string($zoekterm)."%'";
$zoekccon = $conn->query($zoekc);
$zoekci = array();
while ($zoekci[] = $zoekccon->fetch_array());
}
And finally the result page:
<div class="row multi-columns-row alt-features-grid">
<?
$aantal = count($zoekeni) + count($zoekci) - 2;
if($aantal == 0){
echo '<div class="col-sm-6 col-md-4 col-lg-4">
<div class="alt-features-item align-center">
<div class="alt-features-icon">
</div>
<h3 class="alt-features-title font-alt">Er zijn geen resultaten</h3>
</div>
</div>';
}
if($zoekeni[0]['id']){
foreach ($zoekeni as $resultaat) {
if($resultaat['introtext']){
echo '
<div class="col-sm-6 col-md-4 col-lg-4">
<div class="alt-features-item align-center">
<div class="alt-features-icon">
</div>
<h3 class="alt-features-title font-alt">'.$resultaat['title'].'</h3>
<div class="alt-features-descr align-left">
'.IntroText($resultaat['introtext']).'<br><br>
<div class="align-right">
Lees meer
</div>
</div>
</div>
</div>
';
}
}
}
if($zoekci[0]['id']){
foreach ($zoekci as $resultaat) {
if($resultaat['description']){
echo '
<div class="col-sm-6 col-md-4 col-lg-4">
<div class="alt-features-item align-center">
<div class="alt-features-icon">
</div>
<h3 class="alt-features-title font-alt">'.$resultaat['title'].'</h3>
<div class="alt-features-descr align-left">
'.IntroText($resultaat['description']).'<br><br>
<div class="align-right">
Lees meer
</div>
</div>
</div>
</div>
';
}
}
}
?>
</div>

Categories