I use to work at a store that had to fix this issue all the time.
So, right off the bat: Rice is a dumb idea. It's a wives tale that actually can cause more harm than good.
I can't tell you how many people have tried this, and then were shocked that rice got stuck inside the speaker, audio jack, or other small cracks, then swelled everything shut because water expands rice, effectively bricking the phone, or having to bring it to us to try and pick this crap out of the phone's insides.
If you dunked your phone, turn it off asap.
Dry the outside with a towel, flip it upside down and shake it gently to try and get excessive water to drip out.
From there, leave your phone out for 24 hours and don't touch it. Let it dry out.
Try to turn it on after 24 hours. Longer if you are afraid of frying the circuits. **Do not connect the power cable**
Just see if it turns on.
If the phone turns on, take a thin dollar tree q-tip and tap (do not drag) the underside connector to really make sure it's dry before trying the power cable
If the phone turns on, you are golden.
If not, RIP.