Jump to content
Fórum Script Brasil
  • 0

ajuda na listagem


DashFighter

Question

ola bom dia!

 

preciso de ajuda urgente!! fiz uma listagem de quadras no meu código porem ao selecionar com o radioBox um item da minha lista, ele não carrega o selecionado, ele pega o ultimo da lista,  o alguém me ajuda por favor.

o código esta logo abaixo:

 

<?php
require_once "config.php";
$local = $_POST['local'];
?>
<html>
    <style type="text/css">
        <!--
        body {
            background-size: 2000px;
            background-image: url(Arquivo_de_Fundo.jpg);
            background-position: top center;
            background-repeat: no-repeat;
        }
        -->
    </style>    
    <head>
        <meta charset="UTF-8">
        <link rel="shortcut icon" type="image/x-icon" href="paintball.ico">
        <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
        <script src="bootstrap/js/jquery-3.1.1.min.js" type="text/javascript"></script>
        <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>        
        <title>PaintWork</title>
    </head>
    <body>
    <nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">PaintWork</a>
    </div>
    <ul class="nav navbar-nav">
      <li class="active"><a href="./index.php">Home</a></li>
      <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown">PaintWork
        <span class="caret"></span></a>
        <ul class="dropdown-menu">
            <li><a href="./paintwork.php">Sobre Nós</a></li>
            <li><a href="./paintball.php">Historia do Paintball</a></li>
        </ul>
      </li>
      <li class="active"><a href="./Contatos.php">Contatos</a></li>
    </ul>
    <ul class="nav navbar-nav navbar-right">
        <li><a href="./loginView.php"><span class="glyphicon glyphicon-log-in"></span> Login </a></li>
    </ul>
  </div> 
</nav>
    <div class="container">
          <div class="row">
              <div class="col-md-6 col-md-offset-3">
                            <font color="white"><h1 class="page-header text-center">Quadras de <?php echo $local ?></h1> </font>    
        <form class="form-horizontal" role="form" method="post" action="horario.php">
    <div class="form-group">
            <div class="col-sm-10 col-sm-offset-2">           
                <?php
                    $result = mysql_query("SELECT nomefantasia, codquadra FROM quadra WHERE cidade = '$local'");
                    while (($row = mysql_fetch_array($result))) {
                ?>
                <font size="+2" color="white">
                    <input type="radio" name="quadra" value="quadra">
                    <?php
                    //session_start();
                    echo " $row[0]";  $nomequadra=$row[0]; $codquadra=$row[1];
                    $_SESSION['nomequadra'] = $nomequadra;
                    $_SESSION['codquadra'] = $codquadra;
                    ?><br>
                </font>
                <?php          
                    }
                ?>                    
            </div>
    </div>
        <div class="form-group">
            <div class="col-sm-10 col-sm-offset-2">
         <input id="submit" name="submit" type="submit" value="Selecionar" class="btn btn-primary">
            </div>
    </div>
    <div class="form-group">
        <div class="col-sm-10 col-sm-offset-2">
            <! Will be used to display an alert to the user>
        </div>
    </div>
        </form>
         </div>
    </div>
    </div>   
        
    </body>
</html>
 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      651.9k
×
×
  • Create New...