Re: [NEWBIE] Cant get $_POST to work

From: Date: Mon, 21 Feb 2005 13:38:06 +0000
Subject: Re: [NEWBIE] Cant get $_POST to work
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-209123@lists.php.net to get a copy of this message
John Nichel wrote:
The Disguised Jedi wrote:
i think you have to use the ID parameter in the input tag in your HTML Name: <input type="text" name="name" value="your name" id="name" /><br/> Age: <input type="text" name="age" value="your age" id="age" /><br/> try that and see how it goes....
If I'm not mistaken, ID in a form element will assign it a 'style', much the same way as 'class' does. It's been a while since I've done any HTML/CSS, so I could be wrong.
the ID of a DOM element is exactly that - the id of the element in the document (object model). only the NAME attribute is used when POSTing form elements... so that come down to ID only being used on the clientside (as fas as this example is concerned - obviously serverside XML processors may make use of ID attributes for their own reasons) indeed both ID and CLASS attributes can be used to assign style instructions to a DOM element. (bare in mind that assign styles, even in very specific/advanced ways usually doesn't require referencing either attribute - the CSS pros/samurai are recommending using ID amd CLASS to assign style only as a last resort)

« previous php.general (#209123) next »