RE: [PHP] a user_auth script. The Script

From: Date: Mon, 11 Feb 2002 23:11:48 +0000
Subject: RE: [PHP] a user_auth script. The Script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84324@lists.php.net to get a copy of this message
spotted 1 error already missing the starting " after the printf statment. Any more ? -----Original Message----- From: Matthew Darcy [mailto:matthew@darcy.demon.co.uk] Sent: 11 February 2002 23:09 To: Roy Cabaniss; php Subject: RE: [PHP] a user_auth script. The Script <?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

« previous php.general (#84324) next »