Partner Overview

All information related to the Partner can be found here.

prepare("SELECT PrincipalID FROM UserAccounts WHERE FirstName = ? AND LastName = ?"); $stmt1->bind_param("ss", $vorname1, $nachname1); $stmt1->execute(); $stmt1->bind_result($principalID1); $stmt1->fetch(); $stmt1->close(); // Get PrincipalID of person 2 $stmt2 = $con->prepare("SELECT PrincipalID FROM UserAccounts WHERE FirstName = ? AND LastName = ?"); $stmt2->bind_param("ss", $vorname2, $nachname2); $stmt2->execute(); $stmt2->bind_result($principalID2); $stmt2->fetch(); $stmt2->close(); // Check if both PrincipalIDs were found if ($principalID1 && $principalID2) { // Update userprofile for person 1 $stmt3 = $con->prepare("UPDATE userprofile SET profilePartner = ? WHERE useruuid = ?"); $stmt3->bind_param("ss", $principalID2, $principalID1); $stmt3->execute(); $stmt3->close(); // Update userprofile for person 2 $stmt4 = $con->prepare("UPDATE userprofile SET profilePartner = ? WHERE useruuid = ?"); $stmt4->bind_param("ss", $principalID1, $principalID2); $stmt4->execute(); $stmt4->close(); echo "

Partner information updated successfully!

"; } else { echo "

Could not find both users in the database.

"; } mysqli_close($con); } else { echo "

Invalid registration password.

"; } } else { echo "

Please fill in all fields correctly.

"; } } ?>