Controlling two servos with two potentiometers simultaneously

) the program doesn't works

I don't know why you didn't post your code, and I don't want to download to my phone, but how are you powering this?

What does "doesn't work" mean to you?

Edit: easy - val1 and val2 have not been defined.