'bob', 'lastname' => 'tester', 'email' => 'bob@nowhere.com'); $users[] = array('firstname' => 'bob2', 'lastname' => 'tester2', 'email' => 'bob2@nowhere.com'); $login_post = array('login_id' => $manager_username, 'login_password' => $manager_password, 'state' => 'MO'); $login_url = 'http://eeando.unl.edu/rbst/manager/login/main.php?action=login'; $login_files = array(); $login_options = array(); $ret = http_post_fields($login_url, $login_post, $login_files, $login_options, $login_info); $login_headers = http_parse_headers($ret); // login success if($login_headers['Location'] == '../account/index.php') { foreach($users as $user) { $adduser_post = array('name_first' => $user['firstname'], 'name_last' => $user['lastname'], 'name_mi' => '', 'email_address' => $user['email'], 'action' => 'Add Employee', 'is_employee' => 'true'); $adduser_url = 'http://eeando.unl.edu/rbst/manager/account/seller_add_employee.php'; $adduser_files = array(); $cookie = http_parse_cookie($login_headers['Set-Cookie']); $adduser_options = array('cookies' => $cookie->cookies); $ret = http_post_fields($adduser_url, $adduser_post, $adduser_files, $adduser_options, $adduser_info); $adduser_headers = http_parse_headers($ret); } } ?>