Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function register($first_name, $last_name, $phone, $email_address, $address, $address_2, $city, $state, $zip, $username, $passcode, $acctype){
- global $db;
- $data = Array(
- 'first_name' => $first_name,
- 'last_name' => $last_name,
- 'phone' => $phone,
- 'email_address' => $email_address,
- 'address' => $address,
- 'address_2' => $address_2,
- 'city' => $city,
- 'state' => $state,
- 'zip' => $zip,
- 'username' => $username,
- 'passcode' => md5('salt'.$passcode.'pepper'),
- 'acctype' => $acctype,
- 'date_created' => $db->now()
- );
- $db->insert ('users', $data);
- if ($acctype = 'p'){
- //get id that was made and create parent meta using insert
- $db->where ("username", $username);
- $users = $db->getOne ("users");
- $pid=$users['id'];
- $data2 = Array(
- 'parent_id' => $pid
- );
- $db->insert ('parent_meta', $data2);
- }
- $_SESSION['id'] = login($username, $passcode);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment