Re: a user_auth script. 1 down any more ?

From: Date: Tue, 12 Feb 2002 18:55:17 +0000
Subject: Re: a user_auth script. 1 down any more ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84417@lists.php.net to get a copy of this message
Try closing all your "{" & "}". count them up, you are missing the closing bracket on your while statment.. Jim Lucas ----- Original Message ----- From: "Matthew Darcy" <matthew@darcy.demon.co.uk> To: "hugh danaher" <hdanaher@earthlink.net>; "php" <php-general@lists.php.net> Sent: Tuesday, February 12, 2002 10:25 AM Subject: RE: [PHP] a user_auth script. 1 down any more ? > Massive Help Hugh, > > I missed that one and learnt the lesson make sure statements are closed. > > I am now getting complaint of an error on line 68. I still can't see > anymore. > > More help is appriciated. > > Thanks, > > Matt. > > > -----Original Message----- > From: hugh danaher [mailto:hdanaher@earthlink.net] > Sent: 12 February 2002 16:20 > To: matthew@darcy.demon.co.uk; php > Subject: Re: [PHP] a user_auth script.- Anyone see the problem ? > > > Check for a closing bracket on this statement > > if($row["account_password"]==$login_name // line 14 or 15 needs ) > > Hope this helps > Hugh > > ----- Original Message ----- > From: "Matthew Darcy" <matthew@darcy.demon.co.uk> > To: "hugh danaher" <hdanaher@earthlink.net>; "php" > <php-general@lists.php.net> > Sent: Tuesday, February 12, 2002 12:59 AM > Subject: [PHP] a user_auth script.- Anyone see the problem ? > > > > > > > > <?php > > > > include("../dbconnect.php"); > > > > if ($submit == "sign!") > > { > > $admin_string_auth=("select account_name, account_password, > > account_admin_level from account_details where > account_name='$login_name'") > > or die ("Cant run auth string"); > > > > while ($row=mysql_fetch_array($admin_string_auth)) > > > > { > > if($row["account_password"]==$login_name > > > > { > > > > $query = "insert into account_details > > (account_type, > > account_name, > > account_address, > > account_address1, > > account_address2, > > account_address3, > > account_address4, > > account_address5, > > account_contact, > > account_phone, > > account_fax, > > account_email, > > account_start_date, > > account_authorised_credit, > > account_pin, > > account_disabled_flag, > > metered_jobs, > > unmetered_jobs, > > account_pin_activate) values > > > > ('$account_type', > > '$account_name', > > '$account_house', > > '$account_street', > > '$account_street1', > > '$account_town', > > '$account_city', > > '$account_postcode', > > '$account_contact', > > '$account_phone', > > '$account_fax', > > '$account_email', > > '$account_start', > > '$account_credit_authorised', > > '$account_pin', > > '$account_disabled_flag', > > '$metered_job_count', > > '$unmetered_job_count', > > '$account_pin_activated')"; > > > > > > mysql_query($query) or > > die (mysql_error()); > > > > } > > else > > {printf("could not update"); > > } > > > > } > > > > else > > {printf("Error wrong PAssword"); > > } > > ?> > > > > > > <H2> Data Submitted </H2> > > <H2> <A HREF="view_test_records.php"> View the records > > </A></H2> > > <?php > > } > > > > else > > { > > include("insert_test_data.php"); > > } > > ?> > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#84417) next »