Mianowicie mam taki problem że liczba musi być większa od zera i mam problem z umieszczeniem tego w kodzie .Proszę o pomoc drugi skrypt
<!DOCTYPE HTML> <html> <head> <link rel="stylesheet" href="strona.css" type="text/css" /> <meta charset="utf-8" /> <title></title> </head> <body> <div id="box"> <div id="naglowek"> </div> <div id="tresc"> <form action="form.php" method="post"> liczba:<br /> <input type="text" name="liczba" /><br /> <input type="submit" value="dodaj" /> </form> <form action="pokaz.php" method="post"> <input type="submit" value="Pokaż" href="pokaz.php"> </form> </div> <div id="menu"> <a href="index.php1">Strona główna</a><br> <a href="informatyka.php">Informatyka</a><br> <a href="elektronika.php">Elektronika</a> </div> </div> </body> </html>
<?php if ($_POST['liczba'] >0) $sql = "INSERT INTO liczba ($_POST['liczba']) VALUES ('$liczba')"; } else { } ?> <p> <a href="informatyka.php">Wróć</a> </p>
<?php { echo '<tr> <td>'.$rec['liczba'].'</td> </tr>'; } ?> <p> <a href="informatyka.php">Wróć</a> </p>
w tym mam problem
if ($_POST['liczba'] >0) $sql = "INSERT INTO liczba ($_POST['liczba']) VALUES ('$liczba')";