In my program,user selects a message via radio button and he can either reply,delete or forward that message.

<?php
include("conpage.php");
$Id =$_POST['radiobutton'];
echo "<input type='hidden' name='radiobutton' value='$Id'/>" ;
 $Option=$_REQUEST['Options'];
  if($Option=="Delete")
  {
  $query="DELETE FROM securityscheme WHERE Id='$Id'";
  mysql_query($query);
  mysql_close($con);
 }
  elseif($Option=="Reply")
  {

  header("location:ReplyMessage.php");
  }

  elseif($Option=="Forward")
  {
  header("location:ShowInbox.php");
  }

?>

Now,the problem I am facing is that if i use the header command to direct the user to any page then the code I am using to save the value of radio button is not executed.Please help.

I'm not 100% certain of your problem, but for a start, i don't think you can end your statement with 'elseif', try changing your last 'elseif' statement to just 'else'. See if that solves your problem?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.