Re: Help needed

From: Date: Tue, 01 Apr 2003 15:17:55 +0000
Subject: Re: Help needed
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-141826@lists.php.net to get a copy of this message
Thank you Ernest I am a little confused with the closing curly bracket after $message_new = "$phone is not a valid phone number etc which one should i delete? } if (!ereg("^[0-9)(xX -]{7,20}$",$phone)) { unset($do); $message_new = "$phone is not a valid phone number. Please try again."; include("login_form.inc"); exit(); Andy "Ernest E Vogelsinger" <ernest@vogelsinger.at> wrote in message news:5.2.0.9.2.20030401165125.029ea1d8@mail.vogelsinger.at... > At 16:27 01.04.2003, Andy spoke out and said: > --------------------[snip]-------------------- > >Hi Clint > >OK hope this is not too much and there are likely to be more errors in it. > >Thank you > >Andy > --------------------[snip]-------------------- > > At the line > if ($num == 1) // login name was found { > you have the curly bracket after the comment slashes - this is > diesregarded. Put it before the comment slashes. > > At the line > if ($num2 > 0) // password is correct { > you have the curly bracket after the comment slashes - this is > diesregarded. Put it before the comment slashes. > > After this construct > $message_new = "$phone is not a valid phone number. > Please try again."; > include("login_form.inc"); > exit(); > you have a closing curly brace that doesn't belong here. Remove it. > > > Now your code should run without errors (syntax errors, that is) > > Hint: You should make a habit of using a more clear indentation (if your > code is actually as it is in the mail). A single column indentation is not > enough to make block levels clear at the first sight. You better use 4 or 8 > columns indentation width. > > > -- > >O Ernest E. Vogelsinger > (\) ICQ #13394035 > ^ http://www.vogelsinger.at/ >

« previous php.general (#141826) next »