Jump to content
MakeWebGames

PHPStudent12

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PHPStudent12's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Reacting Well Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

1

Reputation

  1. Would you do the honours
  2. So I was trying to do this myself and managed to add it in my template (Mccodes theme), which I gather you've already figured out. To add to profile, just add this snippet of code in the array section "points" => $this->user->info->US_points,
  3. ok thanks I'll look over my view user also i shouldve said i had to turn off debugging from true to false or the other way i around i don't remember That's because before all I got was gamename critical error - query failed nope I deffo ran the installer, but i just put gamename in my last post to tell you error I got initally. my actual game name I havent yet decided.
  4. ok thanks I'll look over my view user also i shouldve said i had to turn off debugging from true to false or the other way i around i don't remember That's because before all I got was gamename critical error - query failed
  5. it's better if I could do it in the game
  6. should I be looking at the sql or view user.php? sorry I'm still learning
  7. i tried to use this but cant get it to work error message : A critical error has occurred, and page execution has stopped. Below are the details: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND poster_id = 1 AND content = "sjd"' at line 1 Action taken: Attempted to execute query: SELECT COUNT(id) FROM users_comments WHERE profile_id = AND poster_id = 1 AND content = "test comment" comments.php <?php require_once('globals.php'); if(isset($_GET['Delete'])) { $Data = $db->query("SELECT `RecieverID` FROM `gComments` WHERE (`ID` = ".abs(intval($_GET['ID'])).") AND (`RecieverID` = ".$_SESSION['userid'].")",$c); if($db->num_rows($Data)) { $db->query("DELETE FROM `gComments` WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); echo ('The comment chose has been deleted. <br /><a href = "index.php">Go Home</a><br />'); exit($h->endpage()); } else { echo ('This comment doesn\'t belong to you.<br /><a href = "index.php">Go Home</span></a><br />'); exit($h->endpage()); } } if((isset($_POST['comment']))) { if(empty($_POST['comment'])) { echo ('You\'ve failed to fill the form in correctly.'); exit($h->endpage()); } $db->query("INSERT INTO `gComments` VALUES ('', ".$_SESSION['userid'].", ".abs(intval($_GET['ID'])).", '".$db->real_escape_string(strip_tags($_POST['comment']))."')",$c); event_add(abs(intval($_GET['ID'])), ''.$db->real_escape_string($ir['username']).' has just left a comment on your profile!'); echo ('Your comment has successfully been posted.<br /><a href ="index.php">Go Home</a>'); exit($h->endpage()); } else { echo (' <div class="generalinfo_txt"> <div><img src="images/info_left.jpg" alt="" /></div> <div class="info_mid"><h2 style="padding-top:10px;"> Posting Comments</h2></div> <div><img src="images/info_right.jpg" alt="" /></div> </div> <div class="generalinfo_simple"><br> <br><br> <form action = "Comments.php?ID='.$_GET['ID'].'" method = "post"> <input type = "text" name = "comment" value = "" method="post"/><br /> <input type = "submit" value = "Post Comment" /> </form><br /> <a href = "index.php">Go Back</a> <br /><br>'); } ?>
  8. hi yh i think thats exactly whats happening because when i try to clear reports i get this url: http://localhost/staff_users.php?ID=1&verf=a29d9633458a9a570f04b09726bf26c8 with no action, can you help me learn how to add one please? sorry im new to this EDIT: i think i fixed with adding method='post' in the form action
  9. Hello, I'm new to mccodes. I tried to clear existing player reports but keep getting this error message: Error: This script requires an action. This is the code function report_clear() { global $db, $ir, $c, $h, $userid; if (!in_array($ir['user_level'], array(2, 3))) { echo 'You cannot access this area.<br /> &gt; <a href="staff.php">Go Back</a>'; die($h->endpage()); } staff_csrf_stdverify('staff_clear_preport', 'staff_users.php?action=reportsview'); $_POST['ID'] = (isset($_POST['ID']) && is_numeric($_POST['ID'])) ? abs(intval($_POST['ID'])) : 0; if (empty($_POST['ID'])) { echo ' Invalid ID, please go back and try again. <br /> &gt; <a href="staff_users.php?action=reportsview">Go Back</a> '; die($h->endpage()); } $d = $db->query( 'SELECT COUNT(`prID`) FROM `preports` WHERE `prID` = ' . $_POST['ID']); if ($db->fetch_single($d) == 0) { $db->free_result($d); echo ' Report doesn\'t seem to exist, Please go back and try again. <br /> &gt; <a href="staff_users.php?action=reportsview">Go Back</a> '; die($h->endpage()); } $db->free_result($d); $db->query( 'DELETE FROM `preports` WHERE `prID` = ' . $_POST['ID']); stafflog_add('Cleared player report ID ' . $_POST['ID']); echo ' Report deleted. <br /> &gt; <a href="staff_users.php?action=reportsview">Go Back</a> '; die($h->endpage());[/PHP] Im using localhost thanks
×
×
  • Create New...