close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

echo selected value of chekbox group after submit

Thread began 3/22/2021 8:02 pm by Rokon | Last modified 3/24/2021 12:21 pm by Rokon | 295 views | 3 replies

Rokon

Originally Said By: Ray Borduin
  I need context. How do you get the value of an input element after submit? Is the submit a $_GET or $_POST? Is this on the action page of the form?  




This is on $_GET on the action page form

<form name="searchForm" action="/hadith/search/filter/" method="GET" accept-charset="UTF-8">
<div class="form-row">
<div class="col-md-6 col-sm-12 my-1">
<input class="form-control" type="text" name="q" value="<?php echo ((isset($_GET["q"]))?$_GET["q"]:""); ?>" placeholder="যে শব্দ দিয়ে খুঁজতে চান..." required>
</div>

<div class="col-auto my-1">
<select name="lang" id="lang" class="custom-select mr-sm-2" required>
<option value="">-ভাষা সিলেক্ট-</option>
<option value="bn" <?php if (!(strcmp("bn", ((isset($_GET["lang"]))?$_GET["lang"]:"")))) {echo "selected=\"selected\"";} ?>>শুধু বাংলা</option>
<option value="en" <?php if (!(strcmp("en", ((isset($_GET["lang"]))?$_GET["lang"]:"")))) {echo "selected=\"selected\"";} ?>>English only</option>
<option value="ar" <?php if (!(strcmp("ar", ((isset($_GET["lang"]))?$_GET["lang"]:"")))) {echo "selected=\"selected\"";} ?>>العربية</option>
<option value="all"<?php if (!(strcmp("all", ((isset($_GET["lang"]))?$_GET["lang"]:"")))) {echo "selected=\"selected\"";} ?>>বাংলা/العربية</option>
</select>
</div>
<div class="col-auto my-1">
<div class="custom-control custom-checkbox mr-sm-2">
<input type="checkbox" class="custom-control-input" id="customControlAutosizing" name="exact" value="1" <?php if (!(strcmp(((isset($_GET["exact"]))?$_GET["exact"]:""),1))) {echo "checked=\"checked\"";} ?>>

<label class="custom-control-label" for="customControlAutosizing">হুবহু শব্দে</label>
</div>
</div>

<div class="col-auto my-1">

<script language="JavaScript">
function toggle(source) {
checkboxes = document.getElementsByName('book[]');
for(var i=0, n=checkboxes.length;i<n;i++) {
checkboxes[i].checked = source.checked;
}
}
</script>
<div class="form-check pl-3">
<input type="checkbox" onClick="toggle(this)" /><span class="text-danger"> সব বই সিলেক্ট করুন</span>
</div>
<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>
</div>


<div class="col mb-2 my-1">
<button type="submit" name="WADbSearch1" class="btn btn-dark btn-block"><i class="fas fa-search"></i> খুঁজুন</button>
</div>

</div>
</form>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...