SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Help with errors generated from PHP contact form

    I am not a PHP coder but needed to add a simple PHP contact form to a site. I use Firefox's web developer tools to validate the CSS and XHMTL code. I got these errors from the contact form but am not sure how to fix them.

    1. Error Line 86, Column 73: value of attribute "method" cannot be "POST"; must be one of "get", "post"

    <form action="contact-form-handler.php" method="POST">

    The one above I fixed by changing POST to post. How strange.



    The value of the attribute is defined to be one of a list of possible values but in the document it contained something that is not allowed for that type of attribute. For instance, the “selected” attribute must be either minimized as “selected” or spelled out in full as “selected="selected"”; a value like “selected="true"” is not allowed.
    2. Warning Line 88, Column 41: reference to non-existent ID "name"

    <label for="name">Your Name</label>



    This error can be triggered by:
    * A non-existent input, select or textarea element
    * A missing id attribute
    * A typographical error in the id attribute

    Try to check the spelling and case of the id you are referring to.
    3. Warning Line 100, Column 41: reference to non-existent ID "message"

    <label for="message">Message</label>



    This error can be triggered by:
    * A non-existent input, select or textarea element
    * A missing id attribute
    * A typographical error in the id attribute

    Try to check the spelling and case of the id you are referring to.
    4. Warning Line 94, Column 41: reference to non-existent ID "email"

    <label for="email">Email Address</label>



    This error can be triggered by:
    * A non-existent input, select or textarea element
    * A missing id attribute
    * A typographical error in the id attribute

    Try to check the spelling and case of the id you are referring to.

    Could someone more familiar with PHP help me figure out how to correct the above warnings. I want to make sure all code is valid. Thanks.

  2. #2
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    NM I changed <label for.....> to <label id.....> and it validated.

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should have the thread moved to the html forum, because you are validating html. This is not php related.


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
  •