invalid form

Discussion in 'HTML' started by Red, Dec 16, 2004.

  1. Red

    Red Guest

    Here's the error:
    This page is not Valid HTML 4.01 Strict!
    end tag for "FORM" which is not finished

    The error occurs on the first '/' in "https://" of this line:
    <FORM NAME=login ACTION=https://thesite.com/login.php METHOD=post>

    here is the code:
    <fieldset> <legend>User login</legend>
    <FORM NAME=login ACTION=https://thesite.com/login.php METHOD=post> <p>
    Username
    <INPUT type="text" name="username" size="8" MAXLENGTH="20">
    Password
    <INPUT type="password" name="password" size="8" MAXLENGTH="20">
    <INPUT TYPE=checkbox NAME=rememberme VALUE=1><INPUT type="submit"
    name="action" value="Go!">
    <A href="forgotpasswd.php">Forgot your password?</A>
    </p></FORM></fieldset>


    It seems to be telling me I can't put an url in the action - is that
    correct or is it telling me something else ? How do I fix it ?
     
    Red, Dec 16, 2004
    #1
    1. Advertising

  2. Red

    Mark Parnell Guest

    Previously in alt.html, Red <> said:

    > Here's the error:


    Where's the URI?

    > This page is not Valid HTML 4.01 Strict!
    > end tag for "FORM" which is not finished


    Generally this means something is nested incorrectly. But without being
    able to see the page, that's impossible to tell.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Dec 17, 2004
    #2
    1. Advertising

  3. Red

    Red Guest

    Mark Parnell wrote:
    > Previously in alt.html, Red <> said:
    >
    >
    >>Here's the error:

    >
    >
    > Where's the URI?
    >
    >
    >>This page is not Valid HTML 4.01 Strict!
    >>end tag for "FORM" which is not finished

    >
    >
    > Generally this means something is nested incorrectly. But without being
    > able to see the page, that's impossible to tell.


    I thought I posted enough code, but here's a simple test page which has
    the same error: http://reenie.org/test.test.htm

    Red
     
    Red, Dec 17, 2004
    #3
  4. On Thu, 16 Dec 2004 23:56:42 GMT, Red <> wrote:

    [snip]

    > <FORM NAME=login ACTION=https://thesite.com/login.php METHOD=post>


    From an SGML point-of-view, the two slashes form a short tag. Quote the
    attribute value.

    > here is the code:
    > <fieldset> <legend>User login</legend>
    > <FORM


    Out of curiosity, why is your fieldset outside the form? It's legal but
    unusual. FIELDSET elements are meant to group the controls within a form,
    not forms themselves.

    [snip]

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
     
    Michael Winter, Dec 17, 2004
    #4
  5. Red

    Mark Parnell Guest

    Mark Parnell, Dec 17, 2004
    #5
  6. Red

    Red Guest

    Red, Dec 17, 2004
    #6
  7. Red

    Red Guest

    Michael Winter wrote:
    > On Thu, 16 Dec 2004 23:56:42 GMT, Red <> wrote:
    >
    > [snip]
    >
    >> <FORM NAME=login ACTION=https://thesite.com/login.php METHOD=post>

    >
    >
    > From an SGML point-of-view, the two slashes form a short tag. Quote
    > the attribute value.
    >


    Thanks. That did it.
    >> here is the code:
    >> <fieldset> <legend>User login</legend>
    >> <FORM

    >
    >
    > Out of curiosity, why is your fieldset outside the form? It's legal but
    > unusual. FIELDSET elements are meant to group the controls within a
    > form, not forms themselves.


    I just learned about the fieldset tag- here is the url I used as an example
    http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_fieldset
    If I put it about a form element it just puts a box around that element.
    but If I put it around the form it breaks for the legend at the top,
    which I like.



    >
    > [snip]
    >
    > Mike
    >
     
    Red, Dec 17, 2004
    #7
  8. Red

    Mark Parnell Guest

    Previously in alt.html, Red <> said:

    > I just learned about the fieldset tag- here is the url I used as an example
    > http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_fieldset
    > If I put it about a form element it just puts a box around that element.
    > but If I put it around the form it breaks for the legend at the top,
    > which I like.


    As Michael said, it should be used to group form elements - so basically
    replace the paragraph in your example with a fieldset. One fieldset
    around all the input elements.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Dec 17, 2004
    #8
  9. Red

    Red Guest

    Mark Parnell wrote:
    > Previously in alt.html, Red <> said:
    >
    >
    >>I just learned about the fieldset tag- here is the url I used as an example
    >>http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_fieldset
    >>If I put it about a form element it just puts a box around that element.
    >>but If I put it around the form it breaks for the legend at the top,
    >>which I like.

    >
    >
    > As Michael said, it should be used to group form elements - so basically
    > replace the paragraph in your example with a fieldset. One fieldset
    > around all the input elements.
    >

    Ok Done. Thanks for the tip
     
    Red, Dec 17, 2004
    #9
  10. Red

    rf Guest

    Red wrote:

    > end tag for "FORM" which is not finished
    >
    > The error occurs on the first '/' in "https://" of this line:
    > <FORM NAME=login ACTION=https://thesite.com/login.php METHOD=post>


    That action URI should be in quotes:
    <FORM NAME=login ACTION="https://thesite.com/login.php" METHOD=post>

    The validator is parsing along and finds action=https: and then finds a /. A
    / signifies the beginning of a closing tag, but the opening tag has not been
    completed yet, with a >.

    Odd sort of error but that is your problem :)

    --
    Cheers
    Richard.
     
    rf, Dec 17, 2004
    #10
  11. Red

    Red Guest

    Re: invalid form from session variables

    I got my php page to validate by saving it as htm and validating that.
    So far so good. But when I validate the php page directly I get further
    invalid form complaints.
    This is what I have in the code:
    <FORM name="search" action="search.php" method="GET">
    <fieldset><legend><? print $MSG_103 ?></legend>

    This is what comes up in the validator:

    <FORM name="search" action="search.php" method="GET"><input
    type="hidden" name="PHPSESSID" value="c8ffad2baaf1f9ffd71962205098471d" />
    <fieldset><legend>Search </legend>

    Line 52, column 140: document type does not allow element "INPUT" here;
    missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
    "ADDRESS" start-tag

    If I understand it correctly, the hidden field between the form and the
    fieldset tag is causing this error.

    Specifically, where did the hidden tag come from ? I'm stumped on how to
    look for the source of this hidden tag so I can figure out how to put it
    after the fieldset tag. I don't see what invokes the hidden session
    element to appear.

    Red
     
    Red, Dec 17, 2004
    #11
  12. Red

    Oli Filth Guest

    Re: invalid form from session variables

    Red wrote:
    > I got my php page to validate by saving it as htm and validating that.
    > So far so good. But when I validate the php page directly I get further
    > invalid form complaints.
    > This is what I have in the code:
    > <FORM name="search" action="search.php" method="GET">
    > <fieldset><legend><? print $MSG_103 ?></legend>
    >
    > This is what comes up in the validator:
    >
    > <FORM name="search" action="search.php" method="GET"><input
    > type="hidden" name="PHPSESSID" value="c8ffad2baaf1f9ffd71962205098471d" />
    > <fieldset><legend>Search </legend>
    >
    > Line 52, column 140: document type does not allow element "INPUT" here;
    > missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
    > "ADDRESS" start-tag
    >
    > If I understand it correctly, the hidden field between the form and the
    > fieldset tag is causing this error.
    >
    > Specifically, where did the hidden tag come from ? I'm stumped on how to
    > look for the source of this hidden tag so I can figure out how to put it
    > after the fieldset tag. I don't see what invokes the hidden session
    > element to appear.
    >
    > Red
    >
    >
    >


    PHP implements sessions either via cookies or via the URL. In your case, it's
    adding the session ID to the GET URLs via an automatically added INPUT=hidden
    field to the beginning of every form. However, in HTML 4.01 Strict, this is
    invalid HTML, so it's basically a bug in PHP; read
    http://bugs.php.net/bug.php?id=13472.

    There are various php.ini settings you can change (either directly or with
    ini_set() at runtime) to change how PHP deals with sessions, cookies and URL
    rewrites; see http://www.php.net/manual/en/ref.session.php.

    Oli
     
    Oli Filth, Dec 18, 2004
    #12
  13. Red

    red Guest

    Re: invalid form from session variables

    I got my php page to validate by saving it as htm and validating that.
    So far so good. But when I validate the php page directly I get further
    invalid form complaints.
    This is what I have in the code:
    <FORM name="search" action="search.php" method="GET">
    <fieldset><legend><? print $MSG_103 ?></legend>

    Thisis what comes up in the validator:

    <FORM name="search" action="search.php" method="GET"><input
    type="hidden" name="PHPSESSID" value="c8ffad2baaf1f9ffd71962205098471d" />
    <fieldset><legend>Search </legend>

    Line 52, column 140: document type does not allow element "INPUT" here;
    missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
    "ADDRESS" start-tag

    If I understand it correctly, the hidden field between the form and the
    fieldset tag is causing this error. Specifically, where did the hidden
    tag come from ? Is this something to do with Sessions that is is placing
    it in the page ?

    I'm stumped on how to look for the source of this hidden tag so I can
    figure out how to put it after the fieldset tag. I don't see what
    invokes the hidden session element to appear.

    Red
     
    red, Dec 31, 2004
    #13
  14. Red

    Philip Ronan Guest

    Re: invalid form from session variables

    red wrote:

    > This is what I have in the code:
    > <FORM name="search" action="search.php" method="GET">
    > <fieldset><legend><? print $MSG_103 ?></legend>
    >
    > Thisis what comes up in the validator:
    >
    > <FORM name="search" action="search.php" method="GET"><input
    > type="hidden" name="PHPSESSID" value="c8ffad2baaf1f9ffd71962205098471d" />
    > <fieldset><legend>Search </legend>


    Take a look at http://www.forums.34sp.com/viewtopic.php?t=7578

    --
    phil [dot] ronan @ virgin [dot] net
    http://vzone.virgin.net/phil.ronan/
     
    Philip Ronan, Dec 31, 2004
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Li Zhang
    Replies:
    4
    Views:
    6,121
    softip
    Feb 27, 2009
  2. Patrick.O.Ige
    Replies:
    1
    Views:
    1,995
    Patrick.O.Ige
    Jul 2, 2006
  3. Java Guy
    Replies:
    1
    Views:
    701
    Manish Pandit
    Oct 15, 2006
  4. kevin
    Replies:
    0
    Views:
    1,011
    kevin
    Jan 16, 2008
  5. Java Guy
    Replies:
    1
    Views:
    324
Loading...

Share This Page