The first thing to do here is consult with your doctor and make absolute sure there is no outlying source for the pain – kidney trouble, injury etc. Once that’s cleared, here’s the form I use when exercising:
Weighted squats: your head is pulled back; your chest is raised; and you have a slight arch in your lower back. Hold the dumbbells close to your side with your palms facing in. You can try a dumbbell front squat if you don’t like this position. Keep your chest and torso upright and facing straight ahead as you push your hips backward and bend your knees. You may feel tempted to tip forward at the hips, pointing your chest toward the ground, but avoid doing this. Lower your body until your knees form a 90-degree angle with your knees remaining behind your toes. Allow your arms to hang straight down in line with your knees as you perform the movement. If you’re performing the dumbbell front squat, simply keep your arms bent and the dumbbells at your chest throughout the routine. Press through your heels and return to the starting position, keeping your knees slightly bent at the top of the movement, refraining from locking, or fully straightening, your knees.
For the bicep curls: Stand straight with legs shoulder-width apart, or sit against a bench. If sitting on a bench, make sure your head, shoulders and butt are in contact with the bench; place your feet firmly on the ground with a dumbbell in each hand. Make sure your thumbs are curled around the grips and palms facing forward. Bend your elbows and slowly bring the dumbbells up to your chest while breathing out. Keep your elbows by your sides and don’t arch your back. Make sure your wrists are in line with your elbows and keep your shoulders straight.