As a website becomes more sophisticated, so must the code that backs it. When you get to a stage where your website need to pass along user data from one page to another, it might be time to start thinking about using PHP sessions.
The require function is used to include a file into your PHP code. However there is one huge difference between the two functions, though it might not seem that big of a deal.
The Date object is useful when you want to display a date or use a timestamp in some sort of calculation. In java you can either make a Date object by supplying the date of your choice, or you can let Javascript create a Date object based on your visitor's system clock. It is usually best to let Javascript simply use the system clock.