{"id":9511,"date":"2019-10-06T00:54:02","date_gmt":"2019-10-06T05:54:02","guid":{"rendered":"https:\/\/krisbunda.com\/blog\/?p=9511"},"modified":"2019-10-11T22:47:49","modified_gmt":"2019-10-12T03:47:49","slug":"star-rating-checkbox-form-input-html-css-only-server-php-submit-file","status":"publish","type":"post","link":"https:\/\/krisbunda.com\/blog\/2019\/10\/06\/star-rating-checkbox-form-input-html-css-only-server-php-submit-file\/","title":{"rendered":"Star Rating Checkbox Form Input, HTML &#038; CSS Only +Server PHP Submit File"},"content":{"rendered":"\n<p>Here&#8217;s a star rating component using only HTML &amp; CSS, plus a PHP server file to submit the form to for testing. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why no JavaScript? <\/h2>\n\n\n\n<p>JavaScript is great, but some devices don&#8217;t run it. But almost all browsers will run most CSS, and every browser should run HTML. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why only 4 instead of 5 stars? <\/h2>\n\n\n\n<p>I don&#8217;t like 5-star rating systems for subjective items like art, services, and experiences. I understand why Amazon uses 5-stars for products&#8211;that&#8217;s a reasonable scale to evaluate the efficacy and value of products, with 3-stars being an &#8220;average&#8221; product and user experience. Did your product work? Did it sell at a reasonable price? Let&#8217;s rate<em> the widgets <\/em>out of 5 stars. But for purely opinion-based judgements on<em> the arts<\/em>, <em>experiences<\/em>, and <em>services<\/em>, I recommend a scale of  1-to-4.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/It-makes-sense-to-rate-products-on-a-scale-of-1-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"648\" height=\"231\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/It-makes-sense-to-rate-products-on-a-scale-of-1-5.png\" alt=\"It makes sense to rate products on a scale of 1-5\" class=\"wp-image-9562\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/It-makes-sense-to-rate-products-on-a-scale-of-1-5.png 648w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/It-makes-sense-to-rate-products-on-a-scale-of-1-5-150x53.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/It-makes-sense-to-rate-products-on-a-scale-of-1-5-600x214.png 600w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/a><figcaption>It makes sense to rate products on a scale of 1-5<\/figcaption><\/figure><\/div>\n\n\n\n<p>Consider rating a movie with a 5-star scale; It&#8217;s too easy to choose 3 stars and sit on the fence instead of choosing sides. Now consider rating with a 4-star scale; Tell me if you liked it! (3-stars). Or if you really liked it (4-stars). Or if you thought it was terrible (single star)! But at least you <em>provide an opinion<\/em> for this completely subjective experience, not just the ratings-equivalent of &#8220;no comment&#8221;. Tell me yes or no, not maybe.  <\/p>\n\n\n\n<p>This isn&#8217;t everyone&#8217;s opinion, <a rel=\"noreferrer noopener\" aria-label=\"The Dallas News changed to the &quot;standard 4-star scale&quot; (opens in a new tab)\" href=\"https:\/\/www.dallasnews.com\/food\/restaurant-news\/2018\/08\/24\/we-re-changing-our-restaurant-ratings-system-from-5-stars-to-4-and-here-s-why\/\" target=\"_blank\">The Dallas News changed to the &#8220;standard 4-star scale&#8221;<\/a> for restaurant reviews, but they consider 1 star &#8220;good&#8221; and zero stars bad. I like to consider no stars as &#8220;unrated&#8221;.<\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Input-Form-using-HTML-CSS-only.png\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"381\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Input-Form-using-HTML-CSS-only.png\" alt=\"STAR RATING CODE - Input Form using HTML &amp; CSS only\" class=\"wp-image-9529\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Input-Form-using-HTML-CSS-only.png 561w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Input-Form-using-HTML-CSS-only-150x102.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Input-Form-using-HTML-CSS-only-365x248.png 365w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/a><figcaption>STAR RATING CODE &#8211; Input Form using HTML &amp; CSS only<\/figcaption><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">You can make it 5-stars or 3-Stars or 10-stars (or 4-Fighter Jets)<\/h4>\n\n\n\n<p>All that 4-star nonsense I just said aside, it&#8217;s easy to add stars (or take them away). Just copy\/paste a new checkbox input with the labels, titles, and values updated to reflect the new star ratings&#8217; values. See the image below, where I pasted in another star input, but changed several values to include a &#8220;5&#8221; instead of the &#8220;4&#8217;s&#8221; I copied . <\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-adding-a-star-Input-Form-using-HTML-CSS-only.png\"><img loading=\"lazy\" decoding=\"async\" width=\"828\" height=\"732\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-adding-a-star-Input-Form-using-HTML-CSS-only.png\" alt=\"STAR RATING CODE - adding a star - Input Form using HTML &amp; CSS only\" class=\"wp-image-9535\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-adding-a-star-Input-Form-using-HTML-CSS-only.png 828w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-adding-a-star-Input-Form-using-HTML-CSS-only-150x133.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-adding-a-star-Input-Form-using-HTML-CSS-only-600x530.png 600w\" sizes=\"auto, (max-width: 828px) 100vw, 828px\" \/><\/a><figcaption>STAR RATING CODE &#8211; adding a star &#8211; Input Form using HTML &amp; CSS only<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Want to rate 5-Thumbs Ups? Or Hearts? Or Beer Steins? <\/h3>\n\n\n\n<p>The stars come from <a rel=\"noreferrer noopener\" aria-label=\"Font Awesome 4.7 (opens in a new tab)\" href=\"https:\/\/fontawesome.com\/v4.7.0\/\" target=\"_blank\">Font Awesome 4.7<\/a>, as referenced in the HTML <code>&lt;head&gt;<\/code> font import and in the CSS attribute <code>content: \"\\f005\"<\/code> unicode for the Font Awesome star icon. (see Gist below for full code).<\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-star.png\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"432\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-star.png\" alt=\"STAR RATING CODE - Font Awesome code for a star\" class=\"wp-image-9546\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-star.png 512w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-star-150x127.png 150w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><figcaption>STAR RATING CODE &#8211; Font Awesome code for a star<\/figcaption><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Changing the Unicode Icon<\/h4>\n\n\n\n<p>But what if we use a different character than the star? How about 5-Fighter Jets?  <code>f0fb<\/code>  5-Hearts? <code>f004<\/code> 5-Thumbs Up? <code>f164<\/code> How about&#8230; uh, the rejected Pied Piper logo from HBO&#8217;s Silicon Valley?! <code>f1a8<\/code> <\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-has-the-rejected-Pied-Piper-icon-from-Silicon-Valley-WTF.png\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"606\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-has-the-rejected-Pied-Piper-icon-from-Silicon-Valley-WTF.png\" alt=\"STAR RATING CODE - Font Awesome has the rejected Pied Piper icon from Silicon Valley---WTF\" class=\"wp-image-9548\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-has-the-rejected-Pied-Piper-icon-from-Silicon-Valley-WTF.png 662w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-has-the-rejected-Pied-Piper-icon-from-Silicon-Valley-WTF-150x137.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-has-the-rejected-Pied-Piper-icon-from-Silicon-Valley-WTF-600x549.png 600w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/a><figcaption>STAR RATING CODE &#8211; Font Awesome has the rejected Pied Piper icon from Silicon Valley&#8212;WTF<\/figcaption><\/figure><\/div>\n\n\n\n<p>So if you want to change your rating icon, just get the Font Awesome Unicode string and replace it in the CSS as shown below. <\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-get-the-Unicode-code-for-your-icon.png\"><img loading=\"lazy\" decoding=\"async\" width=\"396\" height=\"421\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-get-the-Unicode-code-for-your-icon.png\" alt=\"STAR RATING CODE - Font Awesome - get the Unicode code for your icon\" class=\"wp-image-9550\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-get-the-Unicode-code-for-your-icon.png 396w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-get-the-Unicode-code-for-your-icon-141x150.png 141w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/a><figcaption>STAR RATING CODE &#8211; Font Awesome &#8211; get the Unicode code for your icon<\/figcaption><\/figure><\/div>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-rejected-Pied-Piper-icon.png\"><img loading=\"lazy\" decoding=\"async\" width=\"310\" height=\"782\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-rejected-Pied-Piper-icon.png\" alt=\"STAR RATING CODE - Font Awesome code for a rejected Pied Piper icon\" class=\"wp-image-9549\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-rejected-Pied-Piper-icon.png 310w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-code-for-a-rejected-Pied-Piper-icon-59x150.png 59w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/a><figcaption>STAR RATING CODE &#8211; Font Awesome code for a rejected Pied Piper icon<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">&#8230;what&#8217;s the expiration date on this font?<\/h3>\n\n\n\n<p>Remember, I&#8217;m referencing an older version of the Font Awesome icons pack in my HTML. You may want to use a newer version, and it may change the availability of icons. To update to a newer version, change the HTML file <code>&lt;head><\/code> reference as shown to a newer version of CSS stylesheet link snippet you <a rel=\"noreferrer noopener\" aria-label=\"find on the font awesome website (you may have to create a login and a &quot;kit&quot; to get a CSS stylesheet link, if they still let users import their fonts that way) (opens in a new tab)\" href=\"https:\/\/fontawesome.com\/start\" target=\"_blank\">find on the font awesome website (you may have to create a login and a &#8220;kit&#8221; to get a CSS stylesheet link, if they still let users import their fonts that way)<\/a>: <\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-stylesheet-link.png\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"333\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-stylesheet-link.png\" alt=\"STAR RATING CODE - Font Awesome stylesheet link\" class=\"wp-image-9553\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-stylesheet-link.png 549w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-stylesheet-link-150x91.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Font-Awesome-stylesheet-link-80x50.png 80w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/a><figcaption>STAR RATING CODE &#8211; Font Awesome stylesheet link<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"has-background has-kb-palette-3-background-color\">Actually, <a rel=\"noreferrer noopener\" aria-label=\"after reading the Font Awesome site, I just realized I'm way out of date using version 4 (opens in a new tab)\" href=\"https:\/\/fontawesome.com\/how-to-use\/on-the-web\/setup\/upgrading-from-version-4\" target=\"_blank\">after reading the Font Awesome site, I just realized I&#8217;m way out of date using version 4.7<\/a>. So I updated the Gist (below) to show the updated HTML file&#8217;s head section. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Test your form input submission by uploading a simple php file<\/h2>\n\n\n\n<p>I wrote a PHP file that will test if your form is submitting to server and show you what it is submitting. <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror cm-s-dracula\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">    &lt;?php\n      echo &quot;&lt;h2&gt;Your Input:&lt;\/h2&gt;&quot;;\n      \n      foreach($_POST as $key=&gt;$value){\n        echo $key, ' =&gt; ', $value, &quot;&lt;br\/&gt;&quot;;\n    }\n    ?&gt;<\/pre><\/div>\n\n\n\n<p>It should work on forms with other inputs also, as it has a &#8220;for each&#8221; function to parse inputs rather than looking for specific input variable names. As such, it is not a server-side validator of any sort, just a visual check to see what your form is putting out there. And it only works with the POST method, not the GET method. But if you know about that, you&#8217;ll be able to change it to a &#8220;_REQUEST&#8221; or &#8220;_GET&#8221; setup rather quickly.<\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-Input-Form-to-server-PHP-file.png\"><img loading=\"lazy\" decoding=\"async\" width=\"407\" height=\"180\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-Input-Form-to-server-PHP-file.png\" alt=\"STAR RATING CODE - Submitting Input Form to server PHP file\" class=\"wp-image-9530\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-Input-Form-to-server-PHP-file.png 407w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-Input-Form-to-server-PHP-file-150x66.png 150w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/a><figcaption>STAR RATING CODE &#8211; Submitting Input Form to server PHP file<\/figcaption><\/figure><\/div>\n\n\n\n<p>Download the 3 files, and upload them to the same directory to get them to work correctly (or change the external style sheet and form submit destination in the HTML file if you want to save the files in different directories). <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">nuohbruther&#8230; More star ratings philosophy?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Default Zero Stars? Nope. <\/h3>\n\n\n\n<p>I was thinking about adding a jQuery script to set &#8220;0&#8221; stars as &#8220;default&#8221; and then onclick of any other stars (checkbox inputs) in the div, the variable holding the &#8220;default 0 stars&#8221; value would update to the checked value. But I decided not to spend any more time on this, and then it would have scripting involved instead of being purely CSS3 and HTML5, if that matters.  I&#8217;m sure someone has a clever way of doing this &#8220;default zero stars&#8221; scheme that will update to other checked star box values without scripting. I wasn&#8217;t able to think of it right away. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Zero Stars Default is&#8230; Harsh<\/h3>\n\n\n\n<p>I also don&#8217;t know if zero stars is an appropriate value for a star ratings system. Shouldn&#8217;t it just be that an object is either <em><strong><span style=\"text-decoration: underline;\">un<\/span><\/strong><\/em>rated (<em><strong>not<\/strong><\/em> rated zero), or rated at 1-to-more stars? It would be a very harsh ratings system that&#8211;by default&#8211;gave every object the worst possible rating, right? (is that <a rel=\"noreferrer noopener\" aria-label=\"what's wrong with Rotten Tomatoes (opens in a new tab)\" href=\"https:\/\/qz.com\/quartzy\/1518240\/rotten-tomatoes-is-based-on-bad-statistics-use-metacritic-instead\/\" target=\"_blank\">what&#8217;s wrong with Rotten Tomatoes<\/a>?) The way this is set up currently, if no star is clicked (or clicked but then unclicked) no value is submitted, and I think that&#8217;s appropriate from a data structure POV. Unless it&#8217;s very important that each input submit at least a placeholder character, as is sometimes the case&#8211;but that could also be structured on the back end, to have default values that may be overwritten from the front end inputs or not. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why not radio buttons instead of checkboxes?<\/h2>\n\n\n\n<p>I&#8217;m asking myself why I didn&#8217;t make this out of radio buttons instead of checkboxes, as radio buttons are easy to set up in &#8220;there can be only one selection&#8221; groups, as is how you want a star rating to be. But there was a reason for it at the time. I made this months ago and didn&#8217;t write that reason in notes, so maybe it was a dumb reason. As with most web development pursuits, there are many ways to do things. <\/p>\n\n\n\n<div data-amp-lightbox=\"true\" class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-ANY-Input-Form-to-server-PHP-file.png\"><img loading=\"lazy\" decoding=\"async\" width=\"443\" height=\"344\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-ANY-Input-Form-to-server-PHP-file.png\" alt=\"Submit ANY Input Form to server PHP file to test how it looks\" class=\"wp-image-9538\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-ANY-Input-Form-to-server-PHP-file.png 443w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Submitting-ANY-Input-Form-to-server-PHP-file-150x116.png 150w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/a><figcaption>Submit ANY Input Form to server PHP file to test how it looks<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Well, I&#8217;m rambling. <\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">But if you&#8217;re here, hopefully these files help! <\/h4>\n\n\n\n<p>Below are a few GitHub Gists that contain a CSS file, an HTML file, and a PHP file that you can upload all to the same directory (folder on your web server) and try out. If the Gist code snippets are not showing up below, try this link:  <a href=\"https:\/\/gist.github.com\/bunda3d\/d3c5ee0d119a6e3b2930c96a06ad8001\">https:\/\/gist.github.com\/bunda3d\/d3c5ee0d119a6e3b2930c96a06ad8001<\/a> <\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/bunda3d\/d3c5ee0d119a6e3b2930c96a06ad8001.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a star rating component using only HTML &#038; CSS, with checkbox inputs that look like stars. Plus: a PHP server file to submit the form to for testing.<\/p>\n","protected":false},"author":1,"featured_media":9529,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","inline_featured_image":false,"kt_blocks_editor_width":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[773,547,36,772],"class_list":["post-9511","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-designer","tag-code","tag-controls","tag-tutorial","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"taxonomy_info":{"category":[{"value":4,"label":"Designer"}],"post_tag":[{"value":773,"label":"code"},{"value":547,"label":"controls"},{"value":36,"label":"tutorial"},{"value":772,"label":"web development"}]},"featured_image_src_large":["https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Input-Form-using-HTML-CSS-only.png",561,381,false],"author_info":{"display_name":"Kris Bunda","author_link":"https:\/\/krisbunda.com\/blog\/author\/kris-bunda\/"},"comment_info":1,"category_info":[{"term_id":4,"name":"Designer","slug":"designer","term_group":0,"term_taxonomy_id":4,"taxonomy":"category","description":"Posts focusing on web, graphic, CAD, and other design.","parent":0,"count":91,"filter":"raw","cat_ID":4,"category_count":91,"category_description":"Posts focusing on web, graphic, CAD, and other design.","cat_name":"Designer","category_nicename":"designer","category_parent":0}],"tag_info":[{"term_id":773,"name":"code","slug":"code","term_group":0,"term_taxonomy_id":777,"taxonomy":"post_tag","description":"","parent":0,"count":4,"filter":"raw"},{"term_id":547,"name":"controls","slug":"controls","term_group":0,"term_taxonomy_id":555,"taxonomy":"post_tag","description":"","parent":0,"count":4,"filter":"raw"},{"term_id":36,"name":"tutorial","slug":"tutorial","term_group":0,"term_taxonomy_id":36,"taxonomy":"post_tag","description":"","parent":0,"count":33,"filter":"raw"},{"term_id":772,"name":"web development","slug":"web-development","term_group":0,"term_taxonomy_id":776,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"}],"jetpack_featured_media_url":"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2019\/10\/STAR-RATING-CODE-Input-Form-using-HTML-CSS-only.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1NcZe-2tp","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/9511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/comments?post=9511"}],"version-history":[{"count":16,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/9511\/revisions"}],"predecessor-version":[{"id":9566,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/9511\/revisions\/9566"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/media\/9529"}],"wp:attachment":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/media?parent=9511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/categories?post=9511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/tags?post=9511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}