Why when a cry alot my head hurts?

I cried alot because my iphone got smashed

Your brain is punishing you for your broken phone

Don't cry, daddy
Daddy, please don't cry
Daddy, you've still got me and little Tommy
And together we'll find a brand new mommy
Daddy, daddy, please laugh again
Daddy, ride us on your back again
Oh, daddy, please, don't cry

- Elvis Presley, Don't Cry Daddy.

That is completely normal. Crying a lot causes dehydration, which causes headaches. Also, crying cause stress hormones to be released, also causing a headache.