Unanswered: radio button retain information on an update records page
i have a completely userbased website with registered members that have access to adding information for several sections of my page. one of the sections is an area to update personal profile information. On that member's only page, there are radio buttons that set the users gender. Selecting either male or female and clicking the update information button, will change the user's gender perfectly, however, once going back in later to change whatever information, the user's gender is always selecting female, even if the user has selected male. here is my code, hopefully someone can shed some light on this matter....
The most probable reasons as to why you are experiencing the problems you mentioned is BECAUSE when you update the form, its submits the form to the page and $_GET['mod'] makes sense. But when you just open the page without submitting the form a single time, $_GET['mod'] DOESN'T EXIST.
So you have to add another CHECK condition that if the user hasn't submitted the form, it should just show the VALUES FROM THE DATABASE.
You can perhaps shorten your code if you just print "checked" or "" in the <input> tag itself. Here's an example
As a suggestion for a way to retain this information across time without having to do a db lookup every page load, you might check out sessions. Your problem becomes trivial... assuming you get the sessions up and running as intended ;)