Check the computers' TCP/IP Properties.
Start, Connect To, Connection, Properties, Scroll Down TCP/IP and highlight, click Properties and check that Obtain DNS and IP address automatically are enabled.
However, as the issue affects two computers it's more likely in the router.
Connect a computer to the router with an ethernet cable.
See the literature which came with your router for how to access the user setup screens in the router. Once in, go to wireless security and review or renew the wireless security type and password. WPA PSK TKIP is the most common security type in use.
Go to wireless mode and ensure that it's set to a protocol matching your computer's wireless adapter (mixed mode is a safe bet). Have a look for a feature called something like Access List -- it filters access to the network by including or excluding computers by the unique MAC ID. Disable that feature.
Save settings and exit the router user interface (log off).
Disconnect ethernet cable.
Go to the computer's wireless networking setup screen and see if you can detect the router's SSID (wireless call sign). Select that network.
Apply the wireless security type and password to the computer's wireless networking setup screen.