Is it possible to set session variables from a radio button? Here's what I've done so far:
& lt; Form action = "process.php" method "post" & gt; & Lt; Input type = "radio" name = "number" id = "number" value = "1" /> 1 & lt; Input type = "radio" name = "number" id = "number" value = "2" /> 2 & lt; Input type = "radio" name = "number" id = "number" value = "3" /> 3 & lt; Br / & gt; & Lt; Input type = "submit" name = "submit" value = "submit" /> & Lt; / Form & gt;
And then for my process.php:
I have the "number =" echo in the exam and make sure the variable is being set, but it's still coming back empty space.
I am really confused thanks for your help: -)
You are missing =
here:
should be the method "post"
:
Method = "post"
note
You have several problems:
id
always per The page per element must be unique
& lt; Input type = "radio" name = "number" id = "number1" value = "1" /> 1 & lt; Input type = "radio" name = "number" id = "number 2" value = "2" /> 2 & lt; Input type = "radio" name = "number" id = "number3" value = "3" /> 3 & lt; Br / & gt; Avoid using the session_register
function, because it has been deprecated, for example the row below:
Session_register ("number");
Comments
Post a Comment