Can I have spaces in VALUE

For a Radio Button, would this work okay…

        <label><input id="opt5" type="radio" name="education" value="College (Bachelors)" />College (Bachelors)</label>

Yes.

Yup.

Would it be better from a backend standpoint to make the value something like “College_Bachelors” or does’t it matter to HTML or PHP?

Doesn’t matter. So long as you sanitize the data coming in and validate it against what is acceptable, you’ll be fine.

Off Topic:

I’m kicking Ryan’s butt! Too slow there buddy! :stuck_out_tongue: :wink:

2 Likes

The data will be coming in as a string. It doesn’t matter.

I think it’s cool to post something and see things appear instantaneously - including edits!

1 Like

Yes it is.

I beat you @cpradio . 1-2 in favor of you.

Is it bad to be storing values - with spaces in between words - in the database?

“College - Bachelors”
“College - Masters”
“College - Doctorate”

“Worker - Blue-Collar”
“Worker - White-Collar”

(These are attributes about a User, and not keys or anything special.)

No. So long as your database schema type accepts it (string, varchar, text, etc.), you’re fine.

Ryan 1 - 3 cpradio :wink:

(Imagining Howard Cosell announcing this “ring-side” contest!!) :sunglasses:

I don’t know DB crap so I let you have it. You were slow :wink:

Awww, what a poor sportsman :stuck_out_tongue:

Very nice of you to “let me have it” :wink: (just kidding of course)

1 Like

I’m leaving work early to sit here staring at my SP screen. Game. ON.

This is a classic that seems to be appropriate…

Howard Cosell, Right There!

Come on @mikey_w, we need another question! :smile: (not to put you on the spot, but Ryan and I have a very good competition going on in this topic)

I have pre-typed messages ready and waiting! Let me use one of them. Do ask us a question!

LOL Okay, I’ll do my best to help out, although you guys may be out of luck for a while, because I am supposedly supposed to finish my client’s website today… :open_mouth:

Have fun with that.

lol, I can just foresee how that will go.

mikey_w: “Is spaces in the values good for SEO”
Ryan: Yes, you can style that with CSS, here is an example on CodePen!

1 Like