473,414 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

PhP form submitted after javascript check

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
2 2668

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Batezz | last post by:
I have created a form (below) How do I stop it redirecting to another page (productsearchresults.php) when form is submitted if both the fields are blank? Any help appreciated. Batezz
4
by: Andrew Williams | last post by:
Does anyone know of a way to quickly validate an HTML web form? I need to make sure that certain fields on my form actually contain data and are not submitted blank. I have tried using...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
12
by: szar | last post by:
I'm passing numerous array elements called list when a form is submitted. the brackets are necessary for PHP to see all the values as an array. The problem is I can't seem to reference the form...
3
by: M Wells | last post by:
Hi All, I'm wondering if anyone can point me to some JavaScript code I can drop into a page to respond to an attempt to click on specific links if content in textarea on a form has been changed...
7
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form...
4
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit"....
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
3
uranuskid
by: uranuskid | last post by:
Hey folks, I was going to include a contact form on my website. Well, in the first place that seemed an easy thing to do with a form that prompts a PHP file validating the input vaiables and using...
12
by: colt28 | last post by:
Ok so I found an ajax contact form script but i can't get the b****** to work. I made a bunch of alterations to it and it didn't work so i replaced everything with the original and it still didn't...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.