a user_auth script.- Anyone see the problem ?

From: Date: Tue, 12 Feb 2002 08:59:16 +0000
Subject: a user_auth script.- Anyone see the problem ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84373@lists.php.net to get a copy of this message
<?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"); } ?>

« previous php.general (#84373) next »