4) $errors.="Account numbers are only 4 Digits.
"; if (!is_numeric($account)) $errors.="Account Number must be a number.
"; if ($type == "F"){ usernameQuery("frpUsers", $account); }// end if if ($type == "S"){ usernameQuery("recyclingUsers", $account); }// end if }// end if function usernameQuery ($table, $account){ global $errors; $statement = "SELECT email, userName FROM $table WHERE account = '".$account."'"; $result = mysql_query($statement); $accountCheck = mysql_num_rows($result); if ($accountCheck == 1){ while($row = mysql_fetch_array($result)){ $email = $row['0']; $username = $row['1']; }// end while sendEmail($email, $username); $errors.="The user name has been emailed to ".$email; }// end if else if ($AccountCheck == 0){ $errors.="The user name for this account could not be found.
"; unset($account); }// end else if else $errors.="An error occurred selecting your account, please email techsupport@metro-grp.com with this problem and include your username and account number.
"; }// end function function sendEmail($email, $username){ $subject = "Your metro-grp.com user name"; $message = " This email is a reply to your request for your user name. Our Records show your account's username is: User Name: $username To request a change of user name, please email techsupport@metro-grp.com include your current user name, account number, contact name, phone number, and desired user name. (you may be contacted to confirm information before any changes). Thank You. Metro Group Inc. --- This message was generated automatically, do not reply. --- "; mail($email, $subject, $message, "From: Metro Group Inc. \n"); }// end function ?> Metro Group Inc. | Home

Request User Name
  Please fill out the following information. Your user name will be emailed to the address on the account. The submit button will enable when all data is valid. ALL FIELDS ARE REQUIRED.
Account Type:
Account Number:4 Digits
Frequent Recycler - Located on Frequent Recycler Card
Scrap Vendor - Located on any Pickup Ticket left of company name

© Copyright 2005, Metro Group Inc. 401 West 900 South Salt Lake City, Utah 84101