php - Radio button how to? -


What I want to do is that when you vote Y or N (two different radio buttons) and then " Vote "column (in database) = Y or N (which you have picked), if nothing else the error resonates.

I know how to do this half way, I have never worked with the radio boots before, so I need you

  Yes: ; Input type = "radio" value = "y" id = "vote" name = "vote"  

& gt; & Lt; / Input & gt; & Lt; Br> No: & lt; Input type = "radio" value = "n" id = "vote n" name = "vote" & gt; & Lt; / Input & gt;

I gave value N and Y, not identical ID, but same name I think it has the right, but what should I do with the PHP part of what I want to do? I mean I'll call for "vote"? ($ _GET ["vote"]) I do not think so. Here's where IM stuck

Based on whether or not you use the GET or Post method almost again, you have to change the variable name properly.

  if (isset ($ _GET ["vote"])) checks to see if the user input some {$ value = $ _GET ["vote"] is; // Remember, this is not guaranteed to be value or Y or EN otherwise {// display your error}  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -