PHP chatroom

I have a chat room page that I need help with. I have a login page that is supposed to take the users first and last name and on submit take them to the chat.html page. then when the user types a message it shows the users name above the message.