Professional Web Applications Themes

Are xhtml 1.1 forms compatible with PHP5? - PHP Development

Hi, My understanding is that the name attribute has been removed from xhtml 1.1 completely. However when I try to process a form using PHP5 it does not seem to recognise fields which only have an id attribute. <input type="text" id="name" value="..." size="33" /> -- -------------------------------- Richard Quick co.uk...

  1. #1

    Default Are xhtml 1.1 forms compatible with PHP5?

    Hi,

    My understanding is that the name attribute has been removed from xhtml 1.1
    completely.

    However when I try to process a form using PHP5 it does not seem to
    recognise fields which only have an id attribute.

    <input type="text" id="name" value="..." size="33" />


    --
    --------------------------------
    Richard Quick
    co.uk


    Richard Guest

  2. #2

    Default Are xhtml 1.1 forms compatible with PHP5?

    Hi,

    My understanding is that the name attribute has been removed from xhtml 1.1
    completely.

    However when I try to process a form using PHP5 it does not seem to
    recognise fields which only have an id attribute.

    The xhtml 1.1 tag I'm using is:
    <input type="text" id="name" value="..." size="33" /> Which I'm then
    assigning to a variable in PHP as follows:

    $name = $_POST['name'];

    This doesn't seem to work however when I add a name attribute, as follows,
    it works:

    <input type="text" id="name" name="name" value="..." size="33" />

    I'm using the following doctype:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    Am I doing something wrong?

    --------------------------------
    Richard Quick
    co.uk


    Richard Guest

  3. #3

    Default Re: Are xhtml 1.1 forms compatible with PHP5?

    Hello,

    on 05/25/2005 07:36 AM Richard Quick said the following: 

    No you are confused. The name is necessary to tell the browser the names
    of the input values to pass to the server when the form is submited. The
    id attribute is meant for accessing DOM objects via Javascript,
    therefore these must be unique doent wide. Still this has nothing to
    do with PHP.

    --

    Regards,
    Manuel Lemos

    PHP Classes - Free ready to use OOP components written in PHP
    http://www.phpclasses.org/

    PHP Reviews - Reviews of PHP books and other products
    http://www.phpclasses.org/reviews/

    Metastorage - Data object relational mapping layer generator
    http://www.meta-language.net/metastorage.html
    Manuel Guest

  4. #4

    Default Re: Are xhtml 1.1 forms compatible with PHP5?


    I'm not 100% about this, but I think it has to do more with the browse
    you are using than with PHP 5. You see, the browser is responsible fo
    sending the data to the PHP page, so it is your browser requiring yo
    to use the name attribute in addition to the id attribute.
    Regrettably I don't know the solution to this issue

    --
    agusgrieg
    -----------------------------------------------------------------------
    agusgriego's Profile: http://www.macosx.com/forums/member.php?userid=493
    View this thread: http://www.macosx.com/forums/showthread.php?t=19859
    macosx.com - The Answer to Mac Support - http://www.macosx.co

    agusgriego Guest

  5. #5

    Default Re: Are xhtml 1.1 forms compatible with PHP5?

    On Wed, 25 May 2005 11:36:45 +0100, "Richard Quick"
    <co.uk> wrote:
     

    Nope.

    http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_extformsmodule
    http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Forms
    http://www.w3.org/TR/xhtml11/changes.html#a_changes

    --
    Andy Hassall / <co.uk> / <http://www.andyh.co.uk>
    <http://www.andyhsoftware.co.uk/space> Space: disk usage ysis tool
    Andy Guest

  6. #6

    Default Re: Are xhtml 1.1 forms compatible with PHP5?

    "Andy Hassall" <co.uk> wrote in message
    news:com... [/ref]
    1.1 
    >
    > Nope.
    >
    >[/ref]
    http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_extformsmodule 
    http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Forms 


    Thanks. That's just what I needed to know.

    --
    Richard Quick
    http://www.chocolatemagazine.co.uk


    Richard Guest

Similar Threads

  1. Replies: 2
    Last Post: March 23rd, 11:52 AM
  2. 508 compliant forms compatible with Netscape
    By Atwoangelsmom in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: August 18th, 12:45 AM
  3. Compatible=8.1.0 vs compatible=8.1.7 diference
    By Guy in forum Oracle Server
    Replies: 2
    Last Post: November 4th, 12:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139