Sorry, could you tell me why the value 'on' is an issue? I thought it is considered on only when it's clicked on. I guess I don't understand the difference between name and value. I thought name is what is passed as the parameter to CGI, not value. | [reply] |
Parameters have two parts, a name and a value. To get the value of a parameter you query its name: $query->param('name') will return the value. With a checkbox, the parameter will only have a value if it is checked, if it is not checked the value will be empty. The value 'on' is not really an issue, but you want your variable $TB to have the value 'TB' not 'on'.
| [reply] [d/l] |
Thank you. One of my other html forms needed a dropdown menu which didn't need a value. Why is it only checkboxes need a value and not a dropdown menu? Also, I changed the values but still doesn't work. I will try the print statement, but do I have it print back as an html? I'm sorry to bother you so much. I'm kinda new at this.
| [reply] |
It's no bother. Most form inputs do need a value attribute, not just checkboxes. Select menus do have a value but it is contained within the <option> tags. Can you explain what you mean by "still doesn't work". If you comment out your db connection and exit(0); right after your print statements you will get the result in your browser.
| [reply] |