1

I have a simple HTML table display of data that results from an MySQL query. I would like to have a checkbox in the first cell of each row.

I am asking for some suggestions as to where I might go looking for information on how to make this interactivity possible, as I'm sure this is not a "quick-answer" type of question.

Example: http://linux.softpedia.com/screenshots/phpMyAdmin_2.png

1 Answer 1

1
<input type="checkbox" name="rowid[]" value="<?= $row['id'] ?>" />
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you, Ignacio. None of my books, so far as I can tell, have an example of this. Would your code go directly into a cell in the HTML table, or would I need to re-do the whole query output as a form?
Both. The table would be embedded in a form. Iterate through the rows using the appropriate element for the value, and then on the flipside look at $_POST['rowid'] in order to get the selected IDs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.