-2
<?php
$teste = $_POST['Nome'];
?>
<html>
<head>
<title>O</title>
</head>
<body>
<form name="f_cad" method="POST"/>
<input type="text" name="Nome"/>
</body>
</html>
Notice: Undefined index: Name in D: wamp www cursophp all.php on line 2
What’s missing? It’s all right.
"- It’s all right" is more wrong than right. Otherwise it would at least be working. Isn’t it?! The error message means that if the index
Nome
is not set, you should set it or else "check if it is set".– LipESprY
There are other problems in the code, but it would be good to start eliminating these XML things by improperly closing the tags (
/>
) and although HTML5 is permissive (what I consider a specification defect), it pays to do the right thing and close the form.– Bacco