Re: $_POST is empty , but were are the variables posted??

From: Date: Thu, 17 Dec 2009 21:29:58 +0000
Subject: Re: $_POST is empty , but were are the variables posted??
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-300581@lists.php.net to get a copy of this message
On Thu, 2009-12-17 at 13:30 -0800, Steve wrote: > On 12/17/2009 1:21 PM, gato chlr wrote: > > Hi, > > sorry for ask this again, but i really can't solve it. > > It must be easy but i can't find the solution > > > > this is my code: > > //form.php > > <form id='form1' action="mail.php" method="POST"> > > name :</td><td><input id="myname" type="text"> > > <input type="submit" value="enviar"> > > </form> > > > > //and this is the mail.php > > $name = $_POST["myname"]; > > var_dump($name); > > > > and the result is: > > NULL > > > > i'm using php 5, i don'd know what is wrong and i have readed a lot of blogs > > and forums, there is a lot of people with this problem , but i have not > > found a solution. thanks for the help > > > > > You need to name your field with name="myname" > > //form.php > <form id='form1' action="mail.php" method="POST"> > name :</td><td><input id="myname" type="text" > name="myname"> > <input type="submit" value="enviar"> > </form> > > The id attribute is used to attach the element to a <label> or to interact with it with CSS or Javascript. Thanks, Ash http://www.ashleysheridan.co.uk

« previous php.general (#300581) next »