Setting Session Variable from Form

Dominic6969

New Member
I was wondering if it would be possible to set a session variable from a radio button.This is what I have so far: \[code\]<form action="process.php" method"post"><input type="radio" name="number" id="number" value="http://stackoverflow.com/questions/3795533/1" /> 1 <input type="radio" name="number" id="number" value="http://stackoverflow.com/questions/3795533/2" /> 2 <input type="radio" name="number" id="number" value="http://stackoverflow.com/questions/3795533/3" /> 3 <br /><input type="submit" name="Submit" value="http://stackoverflow.com/questions/3795533/Submit" /></form>\[/code\]And then for my process.php: \[code\]<?php session_start();session_register ("number");$_SESSION['number'] = $_POST['number'];echo "Number = ". $_SESSION['number'];?> \[/code\]I have the echo "Number = " in there just to test and make sure the variable is being set, but it still seems to be coming back blank. I am really confussed. Thank you for your help :-)
 
Back
Top