Hi,

I have some problems with validating the values of the fields street,
phone and fax. In the field street I want that only the european
standard for writing ( <number> <name> or <name>. <number>) should be
possible. By other fieldentries the user should be informed of the error
and the proccessing should stop.

In the fields phone and fax it should be able to write  (12345) 12345
or to write 12345 / 12345

The checking of the contactperson in german Ansprechpartner is also
incorrect.

if (!ereg("[a-zA-Z .0-9]",$strasse))
{
        echo "Ung&uuml;ltige Werte in Strasse";
        exit;
}

if (!ereg("[a-zA-Z] \.",$ansprechpartner))
{
        echo "Ung&uuml;ltige Werte im Ansprechpartner";
        exit;
}

if (ereg("[0-9 ()/]",$telefon) == false)
{
        echo "Ung&uuml;ltige Werte bei Telefon";
        exit;
}

if (ereg("[0-9 ()/]",$fax) == false)
{
        echo "Ung&uuml;ltige Werte bei Fax";
        exit;
}

What is the code for the correct validating.

Regards,
Ruprecht Helms
-----------------------------------------------------------------------
Ruprecht Helms IT-Service & Softwaredevelopement

Web: http://www.rheyn.de
Mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to