Variable PHP counter

1

Good people,

I have a form in a PHP file to populate a ranking table. And I wanted my form to ask something like "Athlete number in position

asked by anonymous 17.06.2015 / 16:03

1 answer

2
mysql_select_db($bd, $coneccao);

$query = "SELECT lugar FROM atletas";
$result = mysql_query($query, $coneccao) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$lugar = row['lugar'];
$lugar+=1;


<div id="formT">
    <form  method="post" action="alterarN.php">
        <p>Qual e o Dorsal do atleta em <?php echo $lugar; ?>º lugar?</p>
       <!--nesse _ deve estar o lugar-->
        <p><input type="text"  name="numero" required/></p>
        <input type="submit" value="Registar" id="registar"/>
    </form>
    </div>
    
17.06.2015 / 20:05