Client LoginView your Shopping CartHelp & Frequently Asked QuestionsEmail Us
Home Services Portfolio Web Design Pricing Dreamweaver Templates Web Applications Free Tutorials About Contact Us
Services > CSS Web Design | Professional Logo Design | ASP.net, ASP & PHP Programming | Flash Animation & Programming | Reliable Web Hosting | Website Maintenance
Portfolio > Web Design Portfolio | Web Programming Portfolio | Logo Design Portfolio | Web Design Pricing > Custom Web Design | Logo Design | Business Card Design
Free Web Design Guide > Website Design w/ Dreamweaver & Fireworks | Adobe Fireworks CS4 review | Photo Effects | Text Effects | Graphic Design Ideas | Web Design Ideas
Website Navigation Ideas | CSS Styles Tutorial | Dreamweaver Template | Server Side Includes | Flash Tutorials > Flash Effects | Flash Sound Button | Sound On/Off Button
Flash Preloader | Import External Data | Promotion > SEO Tips | Google Tips & Page Rank | JavaScript > Date Validation | Email Validation | Phone Validation | Tip Boxes

PHP General Tips

In this tutorial you will learn how to retrieve many values using the same checkbox name.

  1. Getting multiple value using the same Check Box name.
    For example when a form contains multiple checkboxes with the same name, multiple input an be retrieved using the following PHP code.
    Your Area of Expertise:

    Result:

    Your Expertise field: Java, PHP, ASP

  2. Sample PHP Code

    <?php
    $strExpert="";
    if(isset($hidSubmit)){
    $count=count($chkexpert);
    for($i=0;$i<$count;$i++){$strExpert="$strExpert$chkexpert[$i], ";}
    }

    ?>

    Sample HTML Code for the above example

    <form name="form1" method="post" action=""> <table width="100%" border="0" bgcolor="#D6E3F7">
    <tr>
    <td class="text">Your are Expertise field: </td>
    </tr>
    <tr>
    <td class="examplelink">
    <input type="checkbox" name="chkexpert[]" value="Java">
    Java
    <input type="checkbox" name="chkexpert[]" value="PHP">
    PHP
    <input type="checkbox" name="chkexpert[]" value="ASP">
    ASP
    <input type="checkbox" name="chkexpert[]" value=".NET">
    .NET
    <input type="checkbox" name="chkexpert[]" value="JavaScript">
    JavaScript</td>
    </tr>
    <tr>
    <td><input type="submit" name="Submit" value="Submit">
    <input name="hidSubmit" type="hidden" id="hidSubmit2" value="true"></td>
    </tr>
    <tr>
    <td class="subtitlesmall"><p>Result:</p>
    <p><span class="reditalic">Your Expertise field: <?php echo $strExpert; ?></span></p></td>
    </tr>
    <tr>
    <td class="reditalic">&nbsp; </td>
    </tr>
    </table>
    </form>

Absolutely FREE Web Templates
Check out these quality free web templates and download them without any registration or sign-up!

FREE Web Design Guide
From web design tips & ideas to HTML, CSS Styles, Fireworks & Dreamweaver you'll find all you need to know about effective web site design right here!

Quality Dreamweaver Templates
Professional quality dreamweaver templates in over 20 categories, starting at just $9.95! Instant download & easy customization

Beauty Templates | Business Templates | Christian Templates | CSS Templates | Education Templates | Family Templates | Flash Templates | Free Dreamweaver Templates
Food Templates | General Templates | Government Templates | Health/Medical Templates | Hi-Tech Templates | Kids/Childcare Templates | Low-cost Budget Templates
Personal Templates | Pets Templates | Photography Templates | Profession Templates | Real Estate Templates | Sports Templates | Telecom Templates | Travel Templates
Free Tutorials > Web Design Tutorials | CSS Web Design | Fireworks Tutorials | Dreamweaver Tutorials | Flash Tutorials | SEO Tutorials | Javascript Tutorials | PHP Tutorials