need help urgently..!! selection in radio button...


#1

can someone look at my coding… i have problem in selecting radio button and redirect to following selection…tq…

[php]

SEMAKAN PELAJAR

 

 

 

 

PEPERIKSAAN


SEMESTER JULAI
SEMESTER DISEMBER

<?PHP if (isset($_POST['btnKeputusan'])) { $selected_radio = $_POST['RadioKeputusan']; if ($selected_radio = 'jan2011') { header("location:yes.php"); } else if ($selected_radio = 'dis2011') { header("location:no.php"); } } ?>
[/php]

#2

should this be like this instead:

[php]
if ($selected_radio = ‘jul’) {
header(“location:yes.php”);
}
else if ($selected_radio = ‘dis’) {
header(“location:no.php”);
}
[/php]


#3

ok… that’s my mistakes, than after altered it, still i cannot redirect my page to radio button that i had choose…


#4

do you see any errors? as your using headers after output has started either move the php code above the html markup or put <?php ob_start();?> at the very top of the file


#5

just realized there’s no form tag try this:

[php]

<?php ob_start();?> SEMAKAN PELAJAR

 

 

 

 

PEPERIKSAAN


SEMESTER JULAI
SEMESTER DISEMBER

<?PHP if (isset($_POST['btnKeputusan'])) { $selected_radio = $_POST['RadioKeputusan']; if ($selected_radio = 'jan2011') { header("location:yes.php"); } else if ($selected_radio = 'dis2011') { header("location:no.php"); } } ?>

[/php]