Email is not a valid email address, please go back."); $result = db_query ("SELECT * FROM domain WHERE domain='$domain'"); if ($result['rows'] != 1) print_error("The domain $domain is not present in the domain table!"); $result = db_query ("SELECT * FROM admin WHERE username='$username'"); if ($result['rows'] == 1) print_error("This email address already exists, please choose a different one."); $result = db_query ("INSERT INTO admin (username,password,domain,create_date,change_date) VALUES('$username','$passwd','$domain',NOW(),NOW())"); if ($result['rows'] == 1) { print "$username has been added to the admin table!\n"; print "
\n"; } else { print_error("Unable to add $username to the mailbox table!"); } } ?> Create a new admin for a domain.