Originally Said By: Ray Borduin
To send multiple books, the url would be: https://www.hadithbd.com/hadith/search/filter/?q=%E0%A6%86%E0%A6%A6%E0%A6%AE&book[]=3&book[]=20&book[]=8&lang=bn&WADbSearch1=
you have to add the [] to allow it to be an array and pass multiple values.
Hello Ray
I tried like that but seems somewhere I am doing something wrong and for this reason now I don't get any result.
<?php
$SearchPage = new WA_MySQLi_RS("SearchPage",$hadithbd,20);
$SearchPage->setQuery("SELECT hadithmain.HadithID, hadithmain.BookID, hadithmain.SectionID, hadithmain.HadithNo, hadithmain.hadithNo2, hadithmain.hadithNo3, hadithmain.ArabicHadith, hadithmain.ArabicHadithNew, hadithmain.BanglaHadith, hadithmain.EnglishHadith, hadithmain.HadithNote, hadithbook.BookNameBD, hadithchapter.ChapterBG, hadithchapter.ChapterAR, hadithchapter.ChapterEN, hadithexplanation.explanation, hadithstatus.StatusBG, hadithsection.SectionBD, hadithsection.SectionEN FROM hadithmain LEFT OUTER JOIN hadithbook ON hadithmain.BookID = hadithbook.BookID LEFT OUTER JOIN hadithchapter ON hadithmain.chapterID = hadithchapter.chapID LEFT OUTER JOIN hadithexplanation ON hadithmain.HadithID = hadithexplanation.hadithID LEFT OUTER JOIN hadithstatus ON hadithmain.HadithStatus = hadithstatus.StatusID LEFT OUTER JOIN hadithsection ON hadithmain.SectionID = hadithsection.SectionID WHERE hadithmain.HadithActive = 1 AND hadithmain.BookID IN (?)");
$SearchPage->bindParam("il", "".(isset($_GET['book[]'])?$_GET['book[]']:"") ."", "-1"); //WAQB_Param1
$SearchPage->execute();?>
-----------------
<div class="form-check">
<?php
$wa_startindex = 0;
while(!$booksList->atEnd()) {
$wa_startindex = $booksList->Index;
?>
<label class="form-check-label pl-3">
<input name="book[]" type="checkbox" class="form-check-input" value="<?php echo($booksList->getColumnVal("BookID")); ?>"><?php echo($booksList->getColumnVal("BookNameBD")); ?>
</label>
<?php
$booksList->moveNext();
}
$booksList->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</div>