So there’s going to be different messages for new users and different messages for existing users. And every time the user visits the Web site we want to increase their count to count how many times they’ve actually visited the Web site. So we want to do all of this within cookies because remember with sessions we can’t actually have a running count and we’re actually going to be depending on the user’s browser for this information. So sessions work much better with databases. After that when the user comes first time shown user first time and again refreshes page second or more time then show second or more visit. The code and Sample Image have shown below.