I want to fetch data from database and show in multiple check box value e.g id_number of laptop in 5 checkboxes with different values but really dont get how to do this..hope anyone can show me easy code in php

Member Avatar for diafol

If your resultset loop you could do something like this...

echo "<input type='checkbox' name='chk[{$row['id']}]' id='chk_{$row['id']}' /> <label for = 'chk_{$row['id']}'>chk_{$row['label']}<label>";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.