1. clicked on the Apple Menu () on the upper left-hand corner of the screen, select System Preferences, then clicked on the Network icon.
2.In the dialog box, click on the Advanced tab in the lower right-hand corner, then click on my network entry and drag it to the top, so that it was the first entry in the list. (It may take a couple of tries to “grab” it.)
3.I then clicked on Apply Now and shut down my computer.
4.Next I re-started my computer and zapped the PRAM. This sounds more dangerous than it really is. You simply hold down the Command (⌘), Option, P, and R keys simultaneously immediately after re-starting the system. You must do this before the gray screen appears. Don’t let go of the keys until you hear the startup sound for the second time.
I tried the pram, but my internet still doesn't work. I don't know if this will help you, but when i tried connecting to MC Donald's WiFi, the message of the agree and continue pops up and that works but then i press i agree, then on my mac book it shows it's connected but i doesn't work for some strange reason. On my webpage it says the same as usual can not connect to the internet. I think maybe something on my computer wont let me connect to a network properly.
Content will be erased after question is completed.