Form validation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steve.burgess@boston-spa.org.uk

    Form validation

    I have a form on my website
    (http://www.nprie.info/content.php?pn=12&frm3~5). When the user submits
    the form various validation checks are completed by another PHP script.
    If any of these fail, the user is redirected back to the form. The
    content that they submitted is retained and sent back in the URL and
    picked up by another script and inserted into the fields.

    My problem is with memo fields as this method of returning the data
    seems to chop off anything after the first newline or carriage return.

    I presume it would be better to POST this information back but how do I
    do this from PHP without a SUBMIT button???

    Many thanks for your continued help.

    Hope all that makes sense - see the website which should clarify the
    process.

    p.s. the &frm3~5 in the link simply ensures that my name appears in the
    "TO" box so if you test the script spurious messages don't go to my
    colleagues.

  • Alvaro G. Vicario

    #2
    Re: Form validation

    *** steve.burgess@b oston-spa.org.uk escribió/wrote (10 Feb 2005 06:47:58
    -0800):[color=blue]
    > The content that they submitted is retained and sent back in the URL and
    > picked up by another script and inserted into the fields.
    >
    > My problem is with memo fields as this method of returning the data
    > seems to chop off anything after the first newline or carriage return.[/color]

    Do you use urlencode()? URLs cannot contain, among many other chars,
    carriage returns.


    --
    -+ Álvaro G. Vicario - Burgos, Spain
    +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
    ++ Manda tus dudas al grupo, no a mi buzón
    -+ Send your questions to the group, not to my mailbox
    --

    Comment

    • StevePBurgess@gmail.com

      #3
      Re: Form validation

      Thank you so much.

      The URLENCODE function has solved the problem.

      Comment

      • Henk Verhoeven

        #4
        Re: Form validation

        >how do I do this from PHP without a SUBMIT button???

        print "<script> document.formNa me.submit(); </script>";


        StevePBurgess@g mail.com wrote:
        [color=blue]
        > Thank you so much.
        >
        > The URLENCODE function has solved the problem.
        >[/color]

        Comment

        Working...