By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,137 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

PhP form submitted after javascript check

P: n/a
Hi everybody,
I made an enrolment form using PhP on the server side and Javascript
on the client side to check the form validity.
When the server gets the form parameters (method POST), it builds a
string with all the data and sends an email containing the string to
the Webmaster who handles enrolments.
Everything seems to work fine on IE 5.5 and higher, Netscape 4.0 and
higher, but time to time the Webmaster receives empty emails (should
not happen since the javascript does not submit empty form).

A spy on the server showed me that the following explorers have sent
empty emails:
Googlebot/2.1 engine
Mozilla/4.0 (compatible; MSIE 4.0; Windows 95)
Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686)

Anyone has an idea of what's going on?
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Rasmus" <ma***********@wanadoo.fr> wrote in message
news:9f**************************@posting.google.c om...

A spy on the server showed me that the following explorers have sent
empty emails:
Googlebot/2.1 engine
Mozilla/4.0 (compatible; MSIE 4.0; Windows 95)
Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686)

Anyone has an idea of what's going on?


Any browser or bot which doesn't parse the JS code, will be able to do this.

Client-side JS validation should always be followed by server-side
validation.
JW

Jul 20 '05 #2

P: n/a
In article <9f**************************@posting.google.com >,
ma***********@wanadoo.fr enlightened us with...

A spy on the server showed me that the following explorers have sent
empty emails:
Googlebot/2.1 engine
Mozilla/4.0 (compatible; MSIE 4.0; Windows 95)
Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686)

Anyone has an idea of what's going on?


The user may not have an email client or the mail client had an error
(if using mailto). The user may not have script enabled or installed.
The client browser may have had an error with the script.

This is why server-side checking and mailing should always be used (in
addition to js validation if client-side checking is also desired). You
also quite possibly haven't received mail from people who otherwise
would have liked to mail you because they don't have a default client
(if you use mailto).

If you have the server do the mail, you should still validate on the
server as well as the client because of js errors or users who don't
have js enabled or installed.

--
--
~kaeli~
In democracy your vote counts. In feudalism your count votes.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.