greetings every1 ,, 😃
how can i pass the value of radio buttons ,
here's the first page which contains the radio buttons :
Code:
<html>
<body>
<form name="example" action="page2.php" method="post">
<p>What is the capital of uk?</p>
<input type="radio" name="test" value="correct!" />London<br />
<input type="radio" name="test" value="false!" />Rome<br />
<input type="submit" value="Submit">
</Form>
</body>
</html>
i store the variable with
page2.php code :
Code:
<?php
session_start();
$select = $_POST['test'];
$_SESSION['test2']= $select;
echo $_SESSION['test2'];
?>
and when i use it in a different page :
Code:
<?php
session_start();
echo $_SESSION['test2'];
?>
i get this error:
"Undefined index: test2 in C:\wamp\www\page3.php on line 3"
help plz,,