Connecting Tech Pros Worldwide Forums | Help | Site Map

Form validation

steve.burgess@boston-spa.org.uk
Guest
 
Posts: n/a
#1: Jul 17 '05
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
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Form validation


*** steve.burgess@boston-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
--
StevePBurgess@gmail.com
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Form validation


Thank you so much.

The URLENCODE function has solved the problem.

Henk Verhoeven
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Form validation


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

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


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