I have this form which has 2 radio buttons. If I select the radio button labeled as one way, the return date and time will be invisible; if I select return, the return date and time will be visible. I just want to test if the data have been entered when oneway is selected. This is because when I select return, I can print out all the input values by user, but if I select oneway, I can't do so.
This is the code I am using.
echo "<h1>Booking</h1>";
$submit = $_POST['submit'];
if ($submit) {
// Check the direction selected by user.
if ($direction == "return") {
if ($liner && $direction && $from && $f_date && $f_time && $destination && $t_date && $t_time && $txttotal) {
echo "$liner/$direction/$from /$f_date/$f_time/ $destination/$t_date/$t_time/$txttotal ";
}
}
}