views:

197

answers:

2

Hi, I have a forum the user fills out with 2 separate radio button categories they can fill out.

Permissions: private <input type="radio" name="permissions" value="private" /> public <input type="radio" name="permissions" value="public"/><br />

Category: default <input type="radio" name="cat" value"default" /> sport <input type="radio" name="cat" value"sport" />school <input type="radio" name="cat" value"school" />geeky <input type="radio" name="cat" value"geeky" />misc <input type="radio" name="cat" value"misc" /> funny <input type="radio" name="cat" value"funny" /><br />

For some reason the cat for category is not showing up in $_POST['cat']; Can you only have 1 set of radio buttons? Thanks!

+1  A: 

Make sure those fields are within the <form></form> tags.

David Barnes
+4  A: 

You have some mistypings.

value"default" should be value="default". same with that whole second line of code. There's no equal signs (=) between the attributes and the values.

Quick Tip: Don't put all those <input /> tags on one line. They'll still show up on the same line on your webpage, but it'll be easier to edit in your text editor. Speaking of which, if you had a text editor with syntax highlighting, you probably would've caught this problem. I suggest Notepad++ or Geany.

Category: 
default <input type="radio" name="cat" value="default" /> 
sport <input type="radio" name="cat" value="sport" /> 
school <input type="radio" name="cat" value="school" /> 
geeky <input type="radio" name="cat" value="geeky" /> 
misc <input type="radio" name="cat" value="misc" /> 
funny <input type="radio" name="cat" value="funny" />
Andrew