I tripped on this one.
I have an HTML form that has all kinds of input elements - text, textarea, radio buttons and checkboxes.
I have no problem inserting or updating data in MySQL DB from the HTML form.
But when I want to display what is already in the DB back on my HTML form, it displays the data that is in text and textarea, but not in radio buttons and checkboxes.

Please advise.

Recommended Answers

All 4 Replies

Could you post an example code of what you did, so we can see where you went wrong?

Thanks,
Cody

while displaying the details, u can check the value stored in ur DB against ur checkbox or radio button and when a match occurs just set the attribute as checked="yes"
if u are unable to do this, paste ur code here..

I tripped on this one.
I have an HTML form that has all kinds of input elements - text, textarea, radio buttons and checkboxes.
I have no problem inserting or updating data in MySQL DB from the HTML form.
But when I want to display what is already in the DB back on my HTML form, it displays the data that is in text and textarea, but not in radio buttons and checkboxes.

Please advise.

Actually, I solved this problem earlier today, but too sleepy now to give the details.
I'll do it tomorrow.

Thank you very much!

well in that case u should mark this thread as solved so others wont waste their time to figure out whats wrong...
Hope u agree..

Actually, I solved this problem earlier today, but too sleepy now to give the details.
I'll do it tomorrow.

Thank you very much!

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.