Radiobuttons and PHP

Issues related to forms.
Post Reply
martin.mattel
 
 
Posts: 83
Joined: Thu Oct 04, 2018 3:04 pm

Radiobuttons and PHP

Post by martin.mattel » Wed Dec 11, 2019 8:00 pm

Hello @Pablo,

maybe a stupid question, but I can´t find it...

I would like to have radiobuttons to be checked by php.
Therefore I created a form and added into that form two radiobuttons rb1 value = 'rb_name1', rb2 value = 'rb_name2'.
Both are member of the same group 'rb_group'.
If one is on the other is off. This works fine in the browser, but checking in PHP
isset($_POST['rb_name1']) always returns that 'rb_name1' (or 'rb_name1' or 'rb_group') is not present.

Do you have a description how to do this properly?

Thanks, Martin

User avatar
Pablo
 
Posts: 21510
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Radiobuttons and PHP

Post by Pablo » Wed Dec 11, 2019 9:12 pm

Radio buttons are standard HTML functionality, so any code that works with standard HTML also works with WWB.

martin.mattel
 
 
Posts: 83
Joined: Thu Oct 04, 2018 3:04 pm

Re: Radiobuttons and PHP

Post by martin.mattel » Wed Dec 11, 2019 10:30 pm

Shame on me, I had a typo :oops:

Post Reply