Suzan Cioc
Suzan Cioc

Reputation: 30097

Why does "<input>" element not post data?

The following page does send nothing in post request after pressing submit button:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>My title</title>
</head>
<body>


                <form id="myform" method="POST" action="save.php" >

                    <label for="title">Title: </label>
                    <input id="title" type="text" size="80" value="Damned"/>

                    <input type="submit">

                </form>


</body>
</html>

Why?

Upvotes: 5

Views: 3664

Answers (1)

AM-
AM-

Reputation: 881

They disobey nothing. You must change

<input id="title"> 

to

<input id="title" name="somethingThatWillAppearIn$_POST">

Upvotes: 18

Related Questions