I am attempting to write a script that when a user selects a radio button it will redirect to the approriate script. but it keeps going to only one page and theat is my p5modify ....what am I doing wrong
<?php
session_start();
if (session_id() != $_SESSION["userid"]) {
$_SESSION['unerror'] = "<font color='red'>You Must Be Logged In.</font>";
header("Location: welcomeinput.php");}
?>
<?php
echo "<h1>Welcome Member</h1>";
if(isset($_POST['login']))
{
$server = 'localhost';
$user = 'root';
$datapassword = '';
$database = 'km';
$table_name = 'subscribers';
$action = $_POST['action'];
$status = "modify";
$statusb = "unsubscribe";
$statusc = "logoff";
$connect = mysql_connect($server, $user, $datapassword) or die ("Could Not Connect!");
mysql_select_db($database, $connect) or die ("Could Not Connect!");
}
//if(session_id()==$_SESSION["userid"]){
if (isset($_POST['modify'])) {
header("location: p5modify.php");
}
else if (isset($_POST['unsubscribe'])) {
header("location: p5unsuscribe.php");
}
else if (isset($_POST['logoff'])) {
header("location: p5logout.php");
}
?>
<form action='p5member.php' method='POST'>
<input type="radio" name="action" value="modify"> Modify<br>
<input type="radio" name="action" value="unsubscribe"> Unsubcribe<br>
<input type="radio" name="action" value="logoff"> logoff<br>
<input type="submit" value="submit">