Problem getting inch and feet characters from form values
I'm creating a form where basketball coaches can enter their teams roster and then that gets sent to a database which then appears on the rosters page of the site.
My problem is where they select the players height. I don't want them to enter it as text manually as I want this to be consistent across all rosters, example: 6' 3"
So I decided to give them a drop down menu to select the height. I go from 4' 0" all the way up to 7' 3".
But I'm pretty sure I can't use this:
<select name="height" >
<option value="4' 8"">4' 8"</option>
Not sure how to get the foot character and inch character to appear correctly in the results.
Thanks for any help
Inches will be: "
Feet will be: ',
Hope this helps! Best to you!
You need to escape (encode) the quotation mark in the <option> tag so that the browser knows that you mean to include it in the value and not the end of it. Just precede the quotation mark with a backslash, as in:
<option value="4' 8\"">4' 8"</option>
Thanks very much guys, got it to work!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)