A PHP question - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: A PHP question

Writing in news:alt.www.webmaster
 From the safety of the  cafeteria

Quoted text here. Click to load it

I can see the technical answer has been given elsewhere in this thread so  
please indulge a little drifting ...

Not having sight of your completed form I don't know if this is relevant  
but, from my perspective form validation (on the typical contact-us page)  
is usually an unnecessary task.  Most such forms have prompts for more  
than one channel of communication - does the site owner/manager really  
want to turn away punters that prefer to do business via email, fax or  
even land-mail?

William Tasso

Re: A PHP question

William Tasso wrote:
Quoted text here. Click to load it

I completely agree, from my point of view, a user has started to
complete a form because they *want* to communicate with the
people/business behind the website. To this end, to force them to
provide information they mat not be comfortable divulging may result in
them surfing elsewhere, potential customer lost!

I usually validate against names being empty along with the comments
field, these would probably be completed anyway. I usually request
confirmation of email address as well to try to prevent typos, I have
had a couple of instances when a form has been sent to me, but the email
address has been wrongly submitted and no telephone number was sent so I
had no reply path. Seemed geniune contact as well. One person did get in
touch a second time the other never did, probably thought I was being
lazy by not replying.

The form I am actually building today, hence my PHP questions, is more
like a mini questionaire so most of the fields are radio or text
buttons. Unfortunately, the client has requested that 2 different
telephone numbers are provided and data is verfied for each field, *very
dangerous imho*. As I am actually doing this as a sub-contract for the
design agency who has the client, I cannot do much other than warn of
the implications of the second number validation.


Re: A PHP question

Si wrote:
Quoted text here. Click to load it

Many thanks to those who helped me build this page. Esp Grey and Chris.

I now have a completed form with error messages working well.

The code seems a bit bloated and if it where ASP I would have a page
about 50% the size of this one, I would like you good people to point
out where it can be trimmed.

This would be an exercise for myself, I am classing this page as
completed, initially I was only asked to do the html anyway! It is now
on the graphic designers site so can't post the URL until release.

I don't have a PHP enabled server to publish this page onto myself, so,
if anyone is interested/inclined to see <cover my back>[the hash i made
of (possible)]</cover my back> this script, shall I post the code
complete here or place it as a .txt file on my server for someone to
upload to there own and let all have a look at front and back end?


Site Timeline