zero-perfoliate
zero-perfoliate

Author Topic: radio buttons :S  (Read 220 times)

Offline gintokis

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
radio buttons :S
« on: May 05, 2010, 11:32:41 AM »
greetings every1 ,, :)
how can i pass the value of radio buttons ,
here's the first page which contains the radio buttons :
Code: [Select]
<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: [Select]

<?php
session_start
();
$select $_POST['test'];
$_SESSION['test2']= $select;
echo 
$_SESSION['test2']; 
?>



and when i use it in a different page :
Code: [Select]

<?php
session_start
();
echo 
$_SESSION['test2'];
?>


i get this error:
"Undefined index: test2 in C:\wamp\www\page3.php on line 3"

>_<

help plz,,