answersLogoWhite

0


Best Answer

Well that's fairly easy, as - if you done it correctly - every checkbox has a name, and if this checkbox has been ticked, the POST or GET variable will hold a value named "on", after submitting the form. A standard code to check wether it has been submitted and checked can be something like:

if(isset($_POST['checkbox1']) && !empty($_POST['checkbox1'])){

do something here...

}

that's it.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you retrieve results of multiple checkboxes in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

How do you add a comment in PHP?

< ?php // This is an example of comment in PHP /* This is another example of comment in PHP and we can write comments in multiple lines using this method */ ? >


How do you merge arrays in PHP?

To merge arrays in PHP all you have to do is use the array_merge() function like shown below: <?php $array1 = array("Matt", "Michael", "Justin"); $array2 = array("Janice", "Janet", "Kylie"); $array3 = array_merge($array1, $array2); ?> One thing to remember when merging arrays is you might be creating duplicate results, if you don't want 2 or more of the same result in the array remember to use the function array_unique() to remove the duplicate results from it!


How do you leran php?

To learn PHP it is best to read a few tutorials and then start trying out the things you read about. For instance, make a program that does some calculations and then prints the result on the screen. A good tutorial to start with can be found on: http://w3schools.com/php/default.asp or http://www.geekatude.com/PHP or http://php.net or http://www.phpmysqlbrain.com You can install the things in your local system , and then by referring the above websites try to write codes and see the results.


What is new in PHP?

PHP is a recursive acronym for "PHP: Hypertext Preprocessor" created by The PHP Group. PHP is a widely used server-side scripting language and the general purpose of PHP is to create dynamic Web Pages. For more information, visit the PHP website.


What is php fullform?

"PHP: Hypertext Preprocessor".

Related questions

How do you pass information from search pages to results pages using php?

One way to pass information from search pages to results pages in PHP is to use query parameters in the URL. You can append the search query as a parameter in the URL of the results page, and then retrieve this parameter using PHP's $_GET superglobal array to display the relevant results. Another common method is to use sessions to store the search query information and access it on the results page.


How are checkboxes sent to PHP from HTML?

The value associated with the checkbox's name, if it is checked, is the value attribute on the corresponding HTML input element.


How do you create an area of a webpage to display PHP results?

PHP code blocks start with <?php and end with ?>.


How do you add a comment in PHP?

< ?php // This is an example of comment in PHP /* This is another example of comment in PHP and we can write comments in multiple lines using this method */ ? >


How do you retrieve username and password from sql database to HTML web page?

You would need to use PHP


How do you retrieve auto increment id in PHP and MySQL?

When creating the MySQL database select "Auto-Increment" on the "Extras" bar.


How do you equate a php variable to a javascript variable?

Ideal thing would be to retrieve the value from PHP using AJAX and then assigning it to a java script variable. Thereafter compare it to the java script variable that is already present.


How do you reverse the results in a PHP array?

To reverse the results in a PHP array is really simple, all you need to do is use the array_reverse() function like shown below: <?php $my_array = array(1, 2, 3); $reverse_me = array_reverse($my_array); // will be stored as 3, 2, 1 now ?>


How do you add HTML5 Geolocation results to a PHP form?

There is no such thing as a PHP form. Forms are written in HTML or other client side scripting languages.


How can you make a PHP form in HTML and submit without using a php file or email?

To submit a file, you don't even need a PHP file. The PHP portion is for processing the form results. You just make a button and make sure you defined the action URL.Name: Gender:Boy: Girl:


How do you pick a random value from a PHP array?

To pick random results from an array in PHP you will need to use the array_rand() function, you can select the amount of results you wish it too select too. <?php $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); $rand_results = array_rand($array, 3); // will select 3 random results from the array and store in a new array ?>


How do you retrieve values from database?

It depends on what database are you using. There are some ways in PHP but the most common of them are PHP native database driver and PDO. PHP native database driver is a collection of functions to communicate with a particular DBMS, they usually have the DBMS name prefixed in the function name. For example, driver functions for MySQL have mysql_* prefix.