So recently, my computer's power button stopped working. i dont know what exactly happened to it, but it just stopped working. now i was completely unable to boot my PC. i spent whole day without my computer, thinking i would take it to a computer technician and fix it the next day. but just for the sake of trying out, i tried figuring some way out myself. I opened my PC's cabinate and searched for the cable which connects the motherboard and the power button(POWER SW cable). I disconnected that cable from the motherboard and took a screwdriver and then trouched it to the pins where the POWER SW cable was connected previously. Voilah! the pc booted up.
The problem was it wouldn't completely boot to my operating and gave me an error that the POWER SW cable was disconnected, obviously because i removed it. but it did gave me an option to go to the BIOS menu by pressing F2. After going to the BIOS menu i went to the 'Power Management' section and then 'AC Recovery' and changed the 'Restore on AC Power Loss' to 'Power On' (its 'Power Off' by default.)
Now if you just give electricity to your computer, it will automatically turn on without the need of pressing the power button on your PC's case/cabinet. So now, i dont need to spend money to fix the power button and it saves me a little bit of time by not having to press the power button everytime i want to turn on my pc.