-1

My html is not sending field data to php in same file until action and method attribute are placed.... kindly identify my error and guide me.....

        <pre><code>
    <?php 
if(isset($_post['submit'])){
echo "Yes is is working";
}
 ?>
<!DOCTYPE html>
<html>
<head>
    <title>testing form</title>
</head>
<body>

<br><br><br><br>
    <form action="test.php" method="post">
        <input type="text" name="name" placeholder="Enter Name"><br>
        <input type="text" name="location" placeholder="ENter location"><br>
        <input type="submit" name="submit">

    </form>
</body>
</html>
         </pre></code>

1 Answers1

-2

Probably you could try by setting id instead of name.

Eg.

<form action="test.php" method="post">
        <input type="text" id="name" placeholder="Enter Name"><br>
        <input type="text" id="location" placeholder="ENter location"><br>
        <input type="submit" id="submit">

    </form>
southernegro
  • 384
  • 4
  • 20