Good day! Made the form with request and function of record in a DB, but it brings empty values. What's wrong?
Actually source:
The form
<form action="zapros.php" method="post" name="form"> Имя: <input type="text" name"name"><br> Год: <input type="text" name"year"><br> Хозяин: <input type="text" name"xoz"><br> <input type="submit" value="Запрос" name="submit"> </form>
request handler:
<? $name = $_POST['name']; $year = $_POST['year']; $xoz = $_POST['xoz']; $db = mysql_connect ("localhost","test","12345"); mysql_select_db("test",$db); $result = mysql_query("INSERT INTO names (name,year,xoz) VALUES ('$name','$year','$xoz')"); if ($result == 'true') { echo "Успешно!"; } else { echo "Неудачно!"; } ?>