Radio buttons not working? :(

Hey there everyone,

I’m currently going through school, and I’m having a bit of an issue with trying to figure out why my radio buttons are not working properly. I can’t get any of the information to pull up at all, and I’m not getting any error messages.

Any infos you could help me out with would be greatly appreciated!

[php]<?php
session_start();
$user = $_SESSION[‘user’];
if(!isset($user)){
header(“Location:login.php”);
}
?>

WDD 420 Course Project
Logo for the Virginia Easter Seals' spring marathon. Home link
Sort By: Last Name Distance <?php include('inc/dbuser.php'); if(isset($_POST['submit_sort'])){ $radio = $_POST['sort']; if($radio =='lname'){ $select ="SELECT fname, lname, email, distance FROM runner ORDER BY lname"; }else if($radio =='distance'){ $select ="SELECT fname, lname, email, distance FROM runner ORDER BY distance";} $result = mysqli_query($lrconnect, $select) or die("Invalid query: ".mysqli_error($lrconnect)); if(mysqli_num_rows($result)==0){ echo ""; } while($row = mysqli_fetch_assoc($result)) { echo ''; echo ''; echo ''; echo ''; } } ?>
First Name: Last Name: Email: Distance:
Sorry, there are currently no runners!
'.$row['fname'].''.$row['lname'].''.$row['email'].''.$row['distance'].'
Dick Hoyt pushing son in wheelchair during a marathon.
Test Site
[/php]

The action in your form, should direct to the page that handles the form, not be a post variable it self.

Sponsor our Newsletter | Privacy Policy | Terms of Service