Forum Moderators: coopster

Message Too Old, No Replies

Checkboxes for mysql records

i need check boxes for every row of mysql records

         

reddysankar

5:02 am on Mar 10, 2009 (gmt 0)

10+ Year Member



Hi everybody,

i have spent lot of hours on this issue due to lack of technical stuff.

Please let me explain my issue.

i have one table with some records.

im showing these table data in a table format like below

id name location
1 reddy hyderabad
2 raja bangalore
3 geetha Chennai
4 rama bangalore
5 ravi chennai

now i need Two check boxes before id field with Accept and Reject for every record.
now i need to select Accept/Reject and in the submit button i need to send mails to all Accept/Reject with Reasons.

I need the coding in PHP and MySQL.

Thanking you

[edited by: eelixduppy at 5:13 am (utc) on Mar. 10, 2009]
[edit reason] removed email [/edit]

Habtom

10:04 am on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could do something like the following:

$query = mysql_query(SELECT id, name, location FROM table_1);

echo "<table>";

while ($result = mysql_fetch_array($query)) {
$id = $result['id'];
echo "<tr><td><input type=\"checkbox\" name=$id></td><td>". $result['name'] ."</td><td>". $result['location'] ."</td></tr>";

}