'; if (strlen( trim($fname))==0 or strlen($lname) == 0) { echo "

You must enter your first and last name.


"; echo "Press the 'Back' button on your browser to continue.
\n"; return; } // verify that user didn't press Back and resubmit: $qry = "SELECT * FROM admin.sp_users WHERE email = '$email'"; $result = MYSQL_QUERY($qry); if (mysql_num_rows($result) > 0){ echo "

This email address already exists! Record cannot be added. Press 'Back' to change.

\n"; return; } echo "

This email address not found. Record will be added.

\n"; $query="insert into admin.sp_users (email,lname,fname,notes,title,org,address,city,state,zip,phone,Purpose,OrgType,FaxNumber,passwd) VALUES ('$email','$lname','$fname',concat(CURRENT_DATE(),'$reqType','$comments'),'$title','$org','$address','$city','$state','$zip','$phone','$reasons','$OrgType','$fax',MD5('$password'))"; // echo "Query: $query

"; runSql($query); //echo "result- $result

"; $idAutoResult = MYSQL_QUERY("select max(idAuto) as idAuto from sp_users"); //echo "idresult- $idAutoResult

"; $idAuto = mysql_result($idAutoResult,0,"idAuto"); $today = date('Y-m-d'); // Add transaction record; $details = "RequestType: $reqType\n Email: $email\nLast name: $lname\nFirst name: $fname\nTitle: $title\nOrganization: $org\nOrganization Type: $OrgType\nAddress: $address\nCity: $city\nState: $state\nZip: $zip\nPhone: $phone\nRequested password: $password\nComments: $comments\nReasons: $reasons\nRequest type: $reqType"; $query = "INSERT INTO admin.sp_list (ticket_createdby_userid, ticket_owner_id, ticket_short_description, ticket_full_description, ticket_status, ticket_severity, groups ticket_added_date) VALUES ($idAuto, $idAuto, QUOTE('$details') , QUOTE('$details'), 'Open','Medium','2', '$today')"; $result = MYSQL_QUERY($query); //echo $idAuto; // old link: http://communityplatform.us/PubApps/regis/formGenerator.php?idAuto=$idAuto if ($reqType=="data") { include("registration_data.php"); } else if ($reqType=="info") { mail("[email protected]","Information Request","Email: $email\nLast name: $lname\nFirst name: $fname\nTitle: $title\nOrganization: $org\nOrganization Type: $OrgType\nAddress: $address\nCity: $city\nState: $state\nZip: $zip\nPhone: $phone\nRequested password: $password\nComments: $comments\nReasons: $reasons\nRequest type: $reqType\nTo update this record: http://communityplatform.us/PubApps/regis/requestIntro.php","From: [email protected]\r\n"); include("registration_reg.php"); } else { mail("[email protected]","Data Access Request","Email: $email\nLast name: $lname\nFirst name: $fname\nTitle: $title\nOrganization: $org\nOrganization Type: $OrgType\nAddress: $address\nCity: $city\nState: $state\nZip: $zip\nPhone: $phone\nRequested password: $password\nComments: $comments\nReasons: $reasons\nRequest type: $reqType\nTo update this record: http://communityplatform.us/PubApps/regis/requestIntro.php","From: [email protected]\r\n"); include("registration_reg.php"); } ?>