Re: [NEWBIE] Cant get $_POST to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux