Jump to content
Fórum Script Brasil
  • 0

ajuda na listagem



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:


require_once "config.php";
$local = $_POST['local'];
    <style type="text/css">
        body {
            background-size: 2000px;
            background-image: url(Arquivo_de_Fundo.jpg);
            background-position: top center;
            background-repeat: no-repeat;
        <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>        
    <nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">PaintWork</a>
    <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>
      <li class="active"><a href="./Contatos.php">Contatos</a></li>
    <ul class="nav navbar-nav navbar-right">
        <li><a href="./loginView.php"><span class="glyphicon glyphicon-log-in"></span> Login </a></li>
    <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">           
                    $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">
                    echo " $row[0]";  $nomequadra=$row[0]; $codquadra=$row[1];
                    $_SESSION['nomequadra'] = $nomequadra;
                    $_SESSION['codquadra'] = $codquadra;
        <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 class="form-group">
        <div class="col-sm-10 col-sm-offset-2">
            <! Will be used to display an alert to the user>

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.

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
    • Total Posts
  • Create New...