$p->Username = $Username; if ($p->Find()) { header("Location: add_patient.php?error=103"); } $p->Password = $Password; $p->FirstName = $FirstName; $p->MiddleName = $MiddleName; $p->LastName = $LastName; $p->Address = $Address; $p->PhoneNumber = $PhoneNumber; $p->UserClass = $UserClass; $p->Height = $Height; $p->Weight = $Weight; $p->DOB = $DOB; $p->Gender = $Gender; $p->SSN = $SSN; $p->MedicalConditions = $MedicalConditions; $p->ClinicianId = $ClinicianId; $p->Insert(); header("Location: patients.php"); /* $worked = $p->Insert(); if ($worked) { header("Location: homepage.php?success=101"); } else { header("Location: add_patient.php?error=101"); } */