bineye Posted July 5, 2011 Posted July 5, 2011 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Oh. Well you "echoed" the error message outside of the staff function. I changed the close-curly-bracket thing above to show you what I mean :) Quote
Mystical Posted July 5, 2011 Posted July 5, 2011 Oh. Well you "echoed" the error message outside of the staff function. I changed the close-curly-bracket thing above to show you what I mean :) That worked for users who are not id1 but now id can see it? No one should see it unless they are trying to delete messages and are not id1. Quote
Mystical Posted July 5, 2011 Posted July 5, 2011 Ignore this ... lol Tried that and got this Parse error: syntax error, unexpected T_STRING in /home/westernv/public_html/chat.php on line 12 It is possessed. Quote
bineye Posted July 5, 2011 Posted July 5, 2011 (edited) Right, go back to the one I posted first....the reason why you are always seeing this is because you are saying: When user_level > 1 (staff member), do one of: *delete comment OR *display error message. There's an easy way around this, but my head is fried from another task right now and everything just looks wrong to me :( EDIT: Actually give this a shot, it might or might not work, I dunno...replace the PHP section with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited July 5, 2011 by bineye Added code Quote
Mystical Posted July 5, 2011 Posted July 5, 2011 Right, go back to the one I posted first....the reason why you are always seeing this is because you are saying: When user_level > 1 (staff member), do one of: *delete comment OR *display error message. There's an easy way around this, but my head is fried from another task right now and everything just looks wrong to me :( EDIT: Actually give this a shot, it might or might not work, I dunno...replace the PHP section with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Thank you for trying to help me. I do appreciate it but that didn't work either. It does not show anything now.... Dayo made this so I am hoping he will answer this post and help me figure this out. Thanks again bineye. Quote
Kieran-R Posted July 5, 2011 Posted July 5, 2011 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
runthis Posted July 6, 2011 Posted July 6, 2011 "abs(intval($_GET['id'])))" Thats not really necessary, (even though i dont do this you can because its logical) If your receiving a GET or POST from the user and you intend for this to only be numbers, simple use math to make sure its a number. $var=($_GET['id'] * 1); Thanks to php this will return a blank string if its not numbers. The only down fall is this will turn negative numbers positive (how the hell is that a downfall) lol Quote
astralreb Posted January 13, 2012 Posted January 13, 2012 (edited) Can someone help me. I want in this chat, when a user writes something, next to his name to be an "attact" link, so if someone clicks to it he can attack this player. Can anyone help me with the code? Thanks in advance Edit: I managed to make it, by adding an extra row in the 'chat' table. Then i defined the variable that has to do with the userid in send.php and finally in the receive.php i added the dynamic link. If someone is interested to make something like that i can give more info. Edited January 14, 2012 by astralreb Quote
maplesyrupghost Posted January 24, 2012 Posted January 24, 2012 Looks like a fantastic mod, thanks in advance. Perhaps I'm missing something, but I think I need a pointer. Most mods SQLs I run work perfectly fine, but there's a couple that are having issues. In the instructions, there is a file called "sql to add.txt" When I run that on my database, I get the message: #1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key Can anyone shed some light on this? Thanks again!! You guys are awesome. Quote
Djkanna Posted January 25, 2012 Posted January 25, 2012 Looks like a fantastic mod, thanks in advance. Perhaps I'm missing something, but I think I need a pointer. Most mods SQLs I run work perfectly fine, but there's a couple that are having issues. In the instructions, there is a file called "sql to add.txt" When I run that on my database, I get the message: #1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key Can anyone shed some light on this? Thanks again!! You guys are awesome. Unknown whether this mod has been updated since it's original release but this should be a working SQL for you. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ^Taken from page two/with the removal of the second AUTO_INCREMENT. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.