[FX.php List] Browser problem

Bob Patin bob at patin.com
Mon Aug 7 18:58:49 MDT 2006


Florence,

Why not validate in PHP?

It's easy to check all form submissions, and then bounce someone back  
to the original page. You can use a bit of Javascript to bounce them  
back, assuming this will work on all browsers (seems to work great in  
IE, Safari, and Firefox); here's how I do it:

if (empty($NAME) or empty($ADDRESS) or empty($CITY)... and so on...

{
?>
<script language="Javascript">
alert ("Please fill in all fields for billing and shipping.")
history.back()
</script>
<?php
}else{

... goes on to the rest of the script.

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com

   CONTACT US VIA INSTANT MESSAGING:
      AIM or iChat: longterm1954
      Yahoo: longterm_solutions
      MSN: tech at longtermsolutions.com
      ICQ: 159333060



On Aug 7, 2006, at 7:54 PM, FHASELTINE at aol.com wrote:

> Erik
> The problem I had with windows using the Java Script was one for  
> validating fields before posting them.  The Java Script does work  
> with the strange characters in them "//-->" I probably should find  
> another script that would do the same thing.  I am requiring that  
> the name and password field be filled in before the Submit is accepted
> I will look for another script to do the work.
> thanks
> Florence  Haseltine
> AIM: Fhaseltine
> fhaseltine at aol.com
> 240-476-7837
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060807/62738e09/attachment-0001.html


More information about the FX.php_List mailing list