I want to send the result of $ K from the PHP code code to the MySQL database, but did something wrong so it does not work.
<html> <body > <div class="cub"> <h2>Тест</h2><hr> <br> <form method="POST" action="<?php $_SERVER['PHP_SELF'];?>"> <input type="hidden" name="Nota" value="'.$k.'" /> <?php echo $k; mysql_query ($ sql); $ con = mysql_connect ("localhost", "root", ""); $ db = mysql_select_db ("testare", $ con); if (isset ($ _ POST ['submit'])) {if (isset ($ _ POST ['Nota']))
mysql_select_db("testare",$con); $sql="INSERT INTO test(nota)VALUES('.$k.')";} ?> <h1> Правильные ответы!</h1> <input type="submit" Value="Отправка"> <br> </form> </div> </body> </html>
не так что не работает.Those. works? - vp_arth<?php $_SERVER['PHP_SELF'];?>can be removed, does nothing. - vp_arth