SMOKEY_TEK Posted February 5, 2011 Share Posted February 5, 2011 I'm not positive this is any good, if you want to make it any better please do so. Make a file called "rating.php" and insert the following into it: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add the following to your "profiles.php" file: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add the following to your "classes.php" file: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Sql : [mysql]ALTER TABLE `grpgusers` ADD `ratings` INT( 11 ) NOT NULL DEFAULT '0';[/mysql] Save the two images to your "images" folder if you have one, if not change the image source. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted February 5, 2011 Share Posted February 5, 2011 its __FILE__ not __FILE In both files you need to global $user_class i belive Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted February 5, 2011 Share Posted February 5, 2011 The users table in GRPG is `grpgusers`. Not `users`. You may also have to secure your $_GET['id'] variable if it isnt already secured in classes. Quote Link to comment Share on other sites More sharing options...
jaymo Posted February 6, 2011 Share Posted February 6, 2011 can't get this to work...for some reason when up or down is clicked it just comes up with a white page. Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted February 6, 2011 Share Posted February 6, 2011 Use just: include "header.php"; and it should work fine. Quote Link to comment Share on other sites More sharing options...
Equinox Posted February 6, 2011 Share Posted February 6, 2011 Overusing isset() and using it wrongly. Has no one else noticed (isset($_GET['id'] != "")) ? Quote Link to comment Share on other sites More sharing options...
Djkanna Posted February 6, 2011 Share Posted February 6, 2011 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Not tested(never used GRPG). Nice try Smokey. :thumbsup: Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted February 6, 2011 Share Posted February 6, 2011 Also what's the point using cases's when there not needed? You could simply do if ($_GET['up'] > 0){ rather than using action = and all that. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted February 6, 2011 Share Posted February 6, 2011 Mabey thats how they learnt, most people use cases, look at big scripts, SMF, WBB, would use like 1000000000 ifs where they can use afew cases.. looks cleaner too Quote Link to comment Share on other sites More sharing options...
Equinox Posted February 6, 2011 Share Posted February 6, 2011 Also what's the point using cases's when there not needed? You could simply do if ($_GET['up'] > 0){ rather than using action = and all that. I would prefer to use cases here. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted February 7, 2011 Share Posted February 7, 2011 Also what's the point using cases's when there not needed? You could simply do if ($_GET['up'] > 0){ rather than using action = and all that. And whats the point of using if statements when not needed? Quote Link to comment Share on other sites More sharing options...
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.