Hello Sir,
I am creating a form using “post” method", While submitting the form get method does work fine but when I was using the post method it shows me error. I am attaching the error by screenshot.
Please find the attachment.
Thank you.
`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv= “refresh” content= “10”>
<title>Form</title>
</head>
<body>
<form action="/redirect.html" method="POST">
<fieldset>
<h1>The Registration Form</h1>
<fieldset style="color: maroon; font-style: oblique; font-weight: 200;">
<legend>Registration Form</legend>
<label for="name">Name: </label><input type="text" name="name" id="name"> <br><br>
<label for="name">DoB: </label><input type="date" name="DoB" id="DoB"> <br><br>
<label for="gender" lenght="10">Gender: </label>
<label for="Male"><input type="radio" name="gender" id="Male">Male</label>
<label for="female"><input type="radio" name="gender" id="female">Female</label>
<label for="other"><input type="radio" name="gender" id="other">Other</label><br><br>
<label for="Email">Email: </label><input type="email" name="email" id="email"><br><br>
<label for="contact">Mobile No: </label><input type="tel" name="contact" id="contact" maxlength="10"><br><br>
<label for="address">Address:</label><br><textarea name="Address" id="address" cols="30" rows="2"></textarea> <br><br>
<button class="clearbutton" type="reset">Reset</button>
<button type="submit">Submit</button><br><br>
</fieldset>
<fieldset style="color: maroon; font-style: oblique; font-weight: 200;">
<!-- this is checkbox -->
<legend>Other Details</legend><br>
<label for="hobby">Hobbies: </label>
<label for="Cricket"><input type="checkbox" name="hobby" id="Cricket">Cricket</label>
<label for="Song"><input type="checkbox" name="hobby" id="Song">Song Listning</label>
<label for="Learning"><input type="checkbox" name="hobby" id="Learning">Learning</label><br><br>
<!-- dropdown menu -->
<label for="State">State: </label>
<select name="State" id="state">
<option value=""></option>
<option value="Maharashtra">Maharashtra</option>
<option value="Gujrat">Gujrat</option>
<option value="Tamilnadu">Tamilnadu</option>
</select><br><br>
</fieldset>
</fieldset>
</body>
</html>
`