In this form code what is the role of name="" attribute?
name="s" and name="submit".
Is it necessary to add?
<form action="/index.php" method="get">
<fieldset>
<legend>Search</legend>
<label for="s"><span>Search WaSP</span>
<input value="" name="s" id="s"></label>
<input type="submit" value="Go!" name="submit" >
</fieldset>
</form>
The
name(“control name”) will be passed into the query string when the form is submitted. This is different from theidattribute which is used to identify an element uniquely by the UA (browser).With
name, the query will be likeWithout
name, the query will be like