<?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

Reply via email to