help on a small bug

Started on the old forum in August 2012 · view the original in the archive · old links redirect here

1 reply · 368 views · started 14 years ago · 1 min read

ozziemale31 Lead · 861 posts #1

well ive nearly finished the forums part of the new script im coding but i have come across a small bug

<?php
$dbname = "test";
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
//////////////////////////////////////////
$conms = mysql_connect($dbhost,$dbuser,$dbpass);
$condb = mysql_select_db($dbname);
include("core.php");
   session_name("PHPSESSID");
session_start();
 $sid = $_SESSION['sid'];
 $uid = getuid_sid($sid);
 $tid = $_GET["tid"];
 $fid = $_GET["fid"];
 $pid = $_GET["pid"];
  $go = $_GET["go"];
  $nick = $_GET["nick"];
 $curr=$uid;
        $nick=getnick_uid($curr);
      $vtime = time();
      $unick = getnick_uid($uid);
 $dnt = mysql_fetch_array(mysql_query("SELECT filename, dcount FROM ibwf_posts WHERE id='".$tid."'"));
 $hit = $dnt[1] + 1;

  mysql_query("Update forum_latest SET id='".$tid."', name='".$nick."', tid='".$tid."'");

     mysql_query("UPDATE ibwf_posts SET dcount='".$hit."' WHERE id='".$tid."'");
header("Location:fattach/$dnt[0]");

?>
 

what i am trying to acheive here is forum_latest gets updated with the file a user clicks on forum posts and it updates the user name as to create a list of whos viewed like here on coding talk.but whats happening is with the code it inserts just the one user it doesnt update the list 🙁 can anyone shed some light on this error. ive tried UPDATE AND INSERT as well

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

ozziemale31 Lead · 861 posts #2

re

issue is solved but thanks lol 🙂 turned out i was missing a $GET function

    Full texts 	id 	name 	pid 	tid 	uid
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	7 	rampage 	0 	30 	0
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	8 	test 	0 	30 	0

Now on to my next adventure creating the list of whos viewed the particular download in the forum topic 🙂

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close