JQuery/PHP Chat Client Help -


I found this cool chat tutorial on CSS-Tricks. ()

I'm trying to use it though. Every time I run it, and when I ask in the chat room, I enter my name, it just shows this code:

  Great! You do not have a username "" $ data [inuse '] = "notinuse";} else {$ data [' result '] = "That username is already in use (Username expires for 2 minutes without use ) "; $ Data [inuse '] = "inuse";} echo json_encode ($ data);}} and {$ username = cleanInput ($ _ POST [' userid ']); $ (= $ Username)) {$ getUsers = "SELECT * chat_users WHERE user name = '$ username'"; If (! Haidata ($ user received)) {$ now = time (); $ Post user = "INSERT IN 'values ​​(zero,' $ user name ',' 1 ',' $ now ')"; Mysql_query ($ postUsers); $ _SESSION ['userid'] = $ username; Header ('location: ./chatrooms.php');} and {header ('location: ./?error=1')}}}}?  

I wonder what the problem might be. Random, but it can help someone else: c)

And remember, I love you!

The fact that you can see the PHP code indicates that this special file is processed by PHP Not being done, just sending the file as plain HTML. Your server is configured incorrectly and you can run PHP scripts or an extension of the file that is not associated with PHP.

Other reasons may be that the script's file permissions are incorrect, usually these permissions should be set to 0755.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -