Hello my friends. I found this cool Chat tutorial on CSS-Tricks. (http://css-tricks.com/chat2/)
I am trying to use it however. Everytime I run it, and I enter my name when it asks in the chat room. It just shows this code:
Great! You found a username not in use"; $data['inuse'] = "notinuse"; } else { $data['result'] = "
That username is already in use. (Usernames take 2 minutes without use to expire)
"; $data['inuse'] = "inuse"; } echo json_encode($data); } } else { $username = cleanInput($_POST['userid']); if (checkVar($username)) { $getUsers = "SELECT * FROM chat_users WHERE username = '$username'"; if (!hasData($getUsers)) { $now = time(); $postUsers = "INSERT INTO `chat_users` ( `id` , `username` , `status` , `time_mod` ) VALUES ( NULL , '$username', '1', '$now' )"; mysql_query($postUsers); $_SESSION['userid'] = $username; header('Location: ./chatrooms.php'); } else { header('Location: ./?error=1'); } } } ?>
I wonder what the issue could be. Random, but this may help someone else :c)
And remember, I love you guys!