Jump to content

spyke01

Members
  • Posts

    74
  • Joined

  • Last visited

    Never

Everything posted by spyke01

  1. hi guys, im building a forum, and when a new message arrives, i have it do a popup window letting the person know, as of sp2 though, popups are usually disabled. IPB v2 corrects this by doing a div(?) that appears in the middle of the screen that can be moved around and such, it lets you read the new message, and other things,how can this be done, i believe it has to do with css, but i could be wrong and it be javascript. If no one knows, i will pull their system apart and figure it out, that way i know what happens and then ill post it here. But, if anyone knows how it is done, please post it here.
  2. awesome, im network, website, and database admin/developer, its laways nice to have someone on the same page that knows his/her stuff, thanx again for all your help, ill probally be back for more questions later till then, thanx
  3. do you do this professionally? ie as a webdesigner?
  4. thak you, its been a long day, im sure that that should fix it, thanks again fenway, btw how long have you been doing this?
  5. hi guys, once again my arch enemy MySQL is beating me, heres the query im trying to get to work: [code] SELECT * FROM `orders` o, `users` u, `shipaddresses` sa WHERE (o.orders_user_id = u.users_userid AND sa.shipaddresses_user_id=o.orders_user_id AND sa.shipaddresses_type='Ship' AND o.orders_status != '') [/code] i end up getting multiple copies of some rows, ive checked and theres only 1 copy of each, heres exports of these tables: [code] CREATE TABLE `orders` (   `orders_order_id` mediumint(8) NOT NULL auto_increment,   `orders_user_id` mediumint(8) NOT NULL default '0',   `orders_order_datetime` datetime NOT NULL default '0000-00-00 00:00:00',   `orders_shipping` varchar(50) NOT NULL default '',   `orders_shipping_price` decimal(12,2) NOT NULL default '0.00',   `orders_tax` decimal(12,2) NOT NULL default '0.00',   `orders_rush_fee` decimal(12,2) NOT NULL default '0.00',   `orders_items_total` decimal(12,2) NOT NULL default '0.00',   `orders_ship1` decimal(12,2) NOT NULL default '0.00',   `orders_ship2` decimal(12,2) NOT NULL default '0.00',   `orders_ship3` decimal(12,2) NOT NULL default '0.00',   `orders_price` decimal(12,2) NOT NULL default '0.00',   `orders_status` varchar(100) NOT NULL default '',   `orders_tracking` varchar(100) NOT NULL default '',   `orders_comments` varchar(250) NOT NULL default '',   PRIMARY KEY  (`orders_order_id`) ) TYPE=MyISAM AUTO_INCREMENT=595030; CREATE TABLE `shipaddresses` (   `shipaddresses_user_id` mediumint(8) NOT NULL default '0',   `shipaddresses_type` varchar(100) NOT NULL default '',   `shipaddresses_first_name` varchar(50) NOT NULL default '',   `shipaddresses_last_name` varchar(50) NOT NULL default '',   `shipaddresses_street_1` varchar(100) NOT NULL default '',   `shipaddresses_street_2` varchar(100) NOT NULL default '',   `shipaddresses_city` varchar(50) NOT NULL default '',   `shipaddresses_state` varchar(50) NOT NULL default '',   `shipaddresses_zip` mediumint(15) NOT NULL default '0',   `shipaddresses_day_phone` varchar(25) NOT NULL default '',   `shipaddresses_night_phone` varchar(25) NOT NULL default '',   `shipaddresses_fax` varchar(25) NOT NULL default '',   `shipaddresses_order_id` mediumint(8) NOT NULL default '0',   `shipaddresses_email_address` varchar(100) NOT NULL default '' ) TYPE=MyISAM; CREATE TABLE `users` (   `users_userid` mediumint(11) NOT NULL auto_increment,   `users_username` varchar(255) NOT NULL default '',   `users_password` varchar(255) NOT NULL default '',   `users_first_name` varchar(50) NOT NULL default '',   `users_last_name` varchar(50) NOT NULL default '',   `users_email_address` varchar(100) NOT NULL default '',   `users_signup_date` int(11) default NULL,   `users_notes` text NOT NULL,   `users_user_level` tinyint(1) NOT NULL default '0',   `users_active` tinyint(1) NOT NULL default '1',   PRIMARY KEY  (`users_userid`) ) TYPE=MyISAM AUTO_INCREMENT=6; [/code] i think that i may need to do some joins, but i dont know
  6. basicly, when i run mysql_query($sql) on the stement it doesnt actually work. ie it appears to go through, but when you check the database, its not working ive tried several things including using parentheses but no go, and i really need this statement to work, i may add another field to try and get it going, but im not sure
  7. ok ive got this following bit of code: [code] $sql = "DELETE FROM `carts` WHERE (carts_order_id='$ORDERID' AND carts_item_id='$todelete' AND carts_item_type='SYSTEM') LIMIT 1";     $result = mysql_query($sql); echo $sql; $sql = "DELETE FROM `orders` WHERE orders_order_id='$ORDERID'";     $result = mysql_query($sql); echo $sql; $sql = "SELECT * FROM `systems` WHERE systems_order_id='$ORDERID'"; $result = mysql_query($sql); if($row = mysql_fetch_array($result)) $SYSTEMID = $row['systems_system_id'];             mysql_free_result($result); $sql = "DELETE FROM `systems` WHERE systems_order_id='$ORDERID' LIMIT 1"; $result = mysql_query($sql);              $sql = " DELETE FROM `systemparts` WHERE systemparts_system_id='$SYSTEMID'";     $result = mysql_query($sql); [/code] ok the problematic query is this: [code] $sql = "DELETE FROM `orders` WHERE orders_order_id='$ORDERID'";     [/code] heres the export of the table: [code] CREATE TABLE `orders` (   `orders_order_id` mediumint(8) NOT NULL auto_increment,   `orders_user_id` mediumint(8) NOT NULL default '0',   `orders_order_datetime` datetime NOT NULL default '0000-00-00 00:00:00',   `orders_shipping` varchar(50) NOT NULL default '',   `orders_shipping_price` decimal(12,2) NOT NULL default '0.00',   `orders_tax` decimal(12,2) NOT NULL default '0.00',   `orders_rush_fee` decimal(12,2) NOT NULL default '0.00',   `orders_items_total` decimal(12,2) NOT NULL default '0.00',   `orders_ship1` decimal(12,2) NOT NULL default '0.00',   `orders_ship2` decimal(12,2) NOT NULL default '0.00',   `orders_ship3` decimal(12,2) NOT NULL default '0.00',   `orders_price` decimal(12,2) NOT NULL default '0.00',   `orders_status` varchar(100) NOT NULL default '',   `orders_tracking` varchar(100) NOT NULL default '',   `orders_comments` varchar(250) NOT NULL default '',   PRIMARY KEY  (`orders_order_id`) ) TYPE=MyISAM AUTO_INCREMENT=2233; -- -- Dumping data for table `orders` -- INSERT INTO `orders` VALUES (2232, 0, '0000-00-00 00:00:00', 'UPS Ground', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, '', '', ''); [/code] now the thing is it looks like its perfect in everyway, but it doesnt do its job of deleting the order. But heres the kicker, [u]if you put it into phpmyadmin it works!![/u] its the same query but it doesnt work outside of phpmyadmin, ive tried adding sql statements together(ie the top 2 together, and the bottom 2 together) but it doesnt work like that either, but once again, [u]if you put it into phpmyadmin it works!![/u] anyone have any ideas?
  8. i dont know how to use a datetime column, and for the querys if youre using a datetimestamp i also dont know how to do those comparisons, basiclly i just need to store the date and time i give it, and also print out only todays, only those in the past, and only those in the future(seperately of course)
  9. hi guys once again im stuck with timestamps. im making an appointment tracking script, itll have 4 sections: todays appointments, future appointments, past appointments, and add appointments, theyll all be on 1 page, and ive gotten the basics working ive just got a few problems. im using unix timestamps because i have several functions for them and i need to track date and time, i use 1 database field for both and run it through a function to get them seperately the problems im having is i need to find only the appointments for the current date in 1 query, then in the next on only the ones in the future, and then the past ones. im also needing to organize them so the one that occurs the soonest will be at the top of the list heres my database export: [code] CREATE TABLE `appts` (   `appts_id` mediumint(8) NOT NULL auto_increment,   `appts_user_id` mediumint(8) NOT NULL default '0',   `appts_status` smallint(1) NOT NULL default '0',   `appts_name` varchar(250) NOT NULL default '',   `appts_date` int(11) NOT NULL default '0',   `appts_where` varchar(100) NOT NULL default '',   `appts_phone` varchar(15) NOT NULL default '',   `appts_about` varchar(250) NOT NULL default '',   PRIMARY KEY  (`appts_id`) ) TYPE=MyISAM AUTO_INCREMENT=3; -- -- Dumping data for table `appts` -- INSERT INTO `appts` VALUES (1, 1, 1, 'Dean Cook', 1137864600, 'high school', '979-979-9797', 'some appt'); [/code] this project can still handle a database change, so if i need to change to something else i can, i just need to make sure i have date, time and is organized like i explained. if anyone could help id greatly appreciate it
  10. heres the error i get upon running the query SQL query: Documentation SELECT * FROM `rmas` WHERE rmas_date IN ( SELECT MAX( rmas_date ) FROM `rmas` GROUP BY rmas_urgency ) GROUP BY rmas_urgency LIMIT 0 , 50 MySQL said: Documentation #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX(rmas_date) FROM `rmas` GROUP BY rmas_urgency ) GROUP
  11. im doing a rma database system for my job, but im having some problems in the dev phase, the query im using is: $sql = "SELECT * FROM `rmas` GROUP BY rmas_urgency ORDER BY rmas_date DESC LIMIT $limit1, $limit2"; $result = mysql_query($sql); i add new rmas by doing this: $sql = "INSERT INTO `rmas` (rmas_title,rmas_date,rmas_tech) VALUES ('NEW RMA -- OPEN TO CHANGE','" . time() . "','HG TECH');"; $result = mysql_query($sql); the database export is: CREATE TABLE `rmas` ( `rmas_id` mediumint(8) NOT NULL auto_increment, `rmas_title` varchar(250) NOT NULL default '', `rmas_user_id` mediumint(8) NOT NULL default '0', `rmas_status` tinyint(1) NOT NULL default '1', `rmas_date` int(11) NOT NULL default '0', `rmas_tech` varchar(50) NOT NULL default '', `rmas_fixable` tinyint(1) NOT NULL default '0', `rmas_action_required` text NOT NULL, `rmas_action_status` tinyint(1) NOT NULL default '1', `rmas_repair_man` varchar(100) NOT NULL default '', `rmas_repair_date_sent` int(11) NOT NULL default '0', `rmas_repair_track_no` varchar(100) NOT NULL default '', `rmas_in_stock` tinyint(1) NOT NULL default '0', `rmas_replaced_date` int(11) NOT NULL default '0', `rmas_replaced_tech` varchar(50) NOT NULL default '', `rmas_replaced_return_track_no` varchar(100) NOT NULL default '', `rmas_replaced_dist` varchar(100) NOT NULL default '', `rmas_replaced_date_ordered` int(11) NOT NULL default '0', `rmas_replaced_order_track_no` varchar(100) NOT NULL default '', `rmas_urgency` mediumint(8) NOT NULL default '0', PRIMARY KEY (`rmas_id`) ) TYPE=MyISAM AUTO_INCREMENT=13; INSERT INTO `rmas` VALUES (10, 'NEW RMA -- OPEN TO CHANGE', 0, 1, 1136575106, 'HG TECH', 0, '', 1, '', 0, '', 0, 0, '', '', '', 0, '', 1); INSERT INTO `rmas` VALUES (11, 'NEW RMA 11-- OPEN TO CHANGE', 0, 1, 1136575107, 'HG TECH11', 0, '', 1, '', 0, '', 0, 0, '', '', '', 0, '', 11); INSERT INTO `rmas` VALUES (12, 'NEW RMA -- OPEN TO CHANGE', 0, 1, 1136575109, 'HG TECH', 0, '', 1, '', 0, '', 0, 0, '', '', '', 0, '', 1); ok now onto the problem. if the rmas_urgency field is the same then only the oldest row will be outputted, this is a problem becuase ineed the database to be treated as a point system, ie. date is most important and then a point scale from 1-5 5 is the most urgent does anyone know whats going on here?
  12. nope, its still not going, gives me no rows
  13. ok, i know how ill do it for 2 querys, but this is annoying me, i tried this also: SELECT * FROM `topics` t LEFT JOIN `posts_read` pr ON t . topic_id =pr . pr_topic_id WHERE pr . pr_id IS NULL and its still a no go
  14. hmm still not working, i think im going to have to run 2 querys, 1 to get the topics, and the other to check if theyre read or not i also relized, that we cant compare anything with posts_read, because the only way there is something in there with a topic_id matching the one in topics is if the topic has been read, and we want all the ones NOT read so we need a query that says: select all the topics that dont have an id in posts_read for this userid
  15. ok, im using 4.0.25 heres what i tried: SELECT t . topic_id , t . topic_status , t . topic_type , t . topic_title , t . topic_status , t . topic_poster , t . topic_views , t . topic_replies , u . users_username FROM `users` u LEFT JOIN `topics` t ON u . users_userid =t . topic_poster LEFT JOIN `posts_read` pr ON t . topic_id =pr . pr_topic_id WHERE pr . pr_userid ='1' AND pr.pr_id IS NULL ORDER BY `t` . `topic_id` ASC and this: SELECT t . topic_id , t . topic_status , t . topic_type , t . topic_title , t . topic_status , t . topic_poster , t . topic_views , t . topic_replies , u . users_username FROM `users` u LEFT JOIN `topics` t ON u . users_userid =t . topic_poster LEFT JOIN `posts_read` pr ON t . topic_id =pr . pr_topic_id WHERE pr . pr_userid ='1' ORDER BY `t` . `topic_id` ASC the first one does nothing but succed, and the second one pulls up all the topics in the database, any ideas?
  16. hmm, i get this error: can you give me a quick explanation of how join works?
  17. ok, im trying to run this query: SELECT t.topic_id, t.topic_status, t.topic_type, t.topic_title, t.topic_status, t.topic_poster, t.topic_views, t.topic_replies, u.users_username from `topics` t, `users` u , `posts_read` pr WHERE (pr.pr_userid = '1' AND pr.pr_topic_id != t.topic_id AND u.users_userid = t.topic_poster) basiclly it should do this: get these fields for any topic that hasnt been read whenever a topic is read, the user's id and the topic id go into the posts_read table that way we can track them, whenever i run this query i get over 2,000 results! theres only 120 posts all together and thats posts not topics! when i run the query, i find that its pulling the same rows over and over, like if i organize the results by t.topic_id i get hundreds of rows that have a 1 for t.topic_id, the only tables being checked here that have topic_id in them is posts_read and topics heres the table schemes: posts_read: CREATE TABLE `posts_read` ( `pr_id` mediumint(8) NOT NULL auto_increment, `pr_topic_id` mediumint(8) NOT NULL default '0', `pr_userid` mediumint(8) NOT NULL default '0', PRIMARY KEY (`pr_id`) ) TYPE=MyISAM AUTO_INCREMENT=268; topics: CREATE TABLE `topics` ( `topic_id` mediumint(8) NOT NULL auto_increment, `topic_forum_id` smallint(8) NOT NULL default '0', `topic_title` varchar(60) NOT NULL default '', `topic_time` int(11) NOT NULL default '0', `topic_poster` mediumint(8) NOT NULL default '0', `topic_views` mediumint(8) unsigned NOT NULL default '0', `topic_replies` mediumint(8) unsigned NOT NULL default '0', `topic_type` tinyint(3) unsigned NOT NULL default '0', `topic_status` tinyint(3) NOT NULL default '0', `topic_first_post_id` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`topic_id`) ) TYPE=MyISAM AUTO_INCREMENT=98; if need be, i can give you some things to insert into these tables, if someone can please help me itd be great
  18. ok ive figured it out, mainly what im doing is deleting out the old entries and then adding them again if the user is still online, later on im going to set it up so that it adds/deletes at the loading of the page, that way i can see whos on a certain page and it be correct, heres the source for anyone who needs it, thank for all your help guys!! ^^ [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php $timeoutseconds [/span][span style=\"color:#007700\"]= ([/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]]) ? [/span][span style=\"color:#DD0000\"]\'2592000\' [/span][span style=\"color:#007700\"]: [/span][span style=\"color:#DD0000\"]\'1200\'[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$timestamp[/span][span style=\"color:#007700\"]=[/span][span style=\"color:#0000BB\"]time[/span][span style=\"color:#007700\"](); [/span][span style=\"color:#0000BB\"]$timeout[/span][span style=\"color:#007700\"]=[/span][span style=\"color:#0000BB\"]$timestamp[/span][span style=\"color:#007700\"]+[/span][span style=\"color:#0000BB\"]$timeoutseconds[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$ip [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$REMOTE_ADDR[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$currentuser [/span][span style=\"color:#007700\"]= ([/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]]) ? [/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]] : [/span][span style=\"color:#DD0000\"]\'Guest\'[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//========================================================== // Delete any user entries that match the current user // This should take care of multiple user entries //========================================================== [/span][span style=\"color:#0000BB\"]$sql [/span][span style=\"color:#007700\"]= ([/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]]) ? [/span][span style=\"color:#DD0000\"]\"DELETE FROM `usersonline` WHERE username = \'\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"\' OR ip = \'$ip\'\" [/span][span style=\"color:#007700\"]: [/span][span style=\"color:#DD0000\"]\"DELETE FROM `usersonline` WHERE ip = \'$ip\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]) or die([/span][span style=\"color:#DD0000\"]\'<br />Error, insert query failed\' [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//========================================================== // Add this user to database //========================================================== [/span][span style=\"color:#0000BB\"]$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"INSERT INTO `usersonline` (username, timestamp, ip, file)\"[/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\"VALUES(\'$currentuser\', \'$timestamp\', \'$ip\', \'\"[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$_SERVER[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'PHP_SELF\'[/span][span style=\"color:#007700\"]].[/span][span style=\"color:#DD0000\"]\"\')\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]) or die([/span][span style=\"color:#DD0000\"]\'<br />Error, insert query failed\' [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//========================================================== // Delete users that have been online for more then \"$timeoutseconds\" seconds //========================================================== [/span][span style=\"color:#007700\"]@[/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"DELETE FROM `usersonline` WHERE timestamp>$timeout\"[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//========================================================== // Shows total users online as well as username //========================================================== [/span][span style=\"color:#0000BB\"]$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM `usersonline`\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$result [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]) or die ([/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]().[/span][span style=\"color:#DD0000\"]\"<br />Couldn\'t execute query: $sql\"[/span][span style=\"color:#007700\"]); if([/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) == [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) [/span][span style=\"color:#FF8000\"]//if NO results, stop the script & return the error message [/span][span style=\"color:#007700\"]{ echo [/span][span style=\"color:#DD0000\"]\"\nError reading usersonline table section 2.<br /><br />\"[/span][span style=\"color:#007700\"]; } else [/span][span style=\"color:#FF8000\"]//if result found, run the rest of the script [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); } [/span][span style=\"color:#0000BB\"]mysql_free_result[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//free our query //========================================================== // Find out whos online and if they\'re a user make a link // to their profile page //========================================================== [/span][span style=\"color:#0000BB\"]$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM `usersonline` WHERE username != \'Guest\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$result [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]) or die ([/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]().[/span][span style=\"color:#DD0000\"]\"<br />Couldn\'t execute query: $sql\"[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$totalguests [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]- [/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$totalusers [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]- [/span][span style=\"color:#0000BB\"]$totalguests[/span][span style=\"color:#007700\"]; if([/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) == [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) [/span][span style=\"color:#FF8000\"]//if NO results, stop the script & return the error message [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#0000BB\"]$users [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"No registered users logged in.\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//add username to our list ^^ [/span][span style=\"color:#007700\"]} else [/span][span style=\"color:#FF8000\"]//if result found, run the rest of the script [/span][span style=\"color:#007700\"]{ while ( [/span][span style=\"color:#0000BB\"]$row [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_array[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) ) { [/span][span style=\"color:#0000BB\"]$sql2 [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM `users` WHERE username = \'$row[username]\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$result2 [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql2[/span][span style=\"color:#007700\"]) or die ([/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]().[/span][span style=\"color:#DD0000\"]\"<br />Couldn\'t execute query: $sql\"[/span][span style=\"color:#007700\"]); if([/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result2[/span][span style=\"color:#007700\"]) == [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) [/span][span style=\"color:#FF8000\"]//if NO results, stop the script & return the error message [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#0000BB\"]$users [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"No registered users logged in.\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//add username to our list ^^ [/span][span style=\"color:#007700\"]} else [/span][span style=\"color:#FF8000\"]//if result found, run the rest of the script [/span][span style=\"color:#007700\"]{ while ( [/span][span style=\"color:#0000BB\"]$row2 [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_array[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result2[/span][span style=\"color:#007700\"]) ) { [/span][span style=\"color:#0000BB\"]$users [/span][span style=\"color:#007700\"].= [/span][span style=\"color:#DD0000\"]\"<a href=\'$menuvar[PROFILE]&action=viewprofile&id=\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$row2[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'userid\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"\'>$row2[username]</a> \"[/span][span style=\"color:#007700\"]; } } [/span][span style=\"color:#0000BB\"]mysql_free_result[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result2[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//free our query [/span][span style=\"color:#007700\"]} } [/span][span style=\"color:#0000BB\"]mysql_free_result[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//free our query //========================================================== //Print out our nice table //========================================================== [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\"\n<center>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n<table class=\'forumborder\' border=\'0\' cellpadding=\'0\' cellspacing=\'1\' width=\'600\'>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <tr class=\'title2\' nowrap height=\'10\'>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <td><center><b>Online Stats</b></center></td>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n </tr>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <tr class=\'ncolour2\' height=\'10\'>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <td>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\" Users Online.<br /><br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//show total users [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$totalguests [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\" Guests.<br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//show number of guests [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$totalusers [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\" Users.<br /><br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//show number of users [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$users[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n </td>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n </tr>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n</table>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n</center><br /><br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--]
  19. so add say an table olumn named id set to autoincriment then say attach the id value to the end of guest and then change i via ip or username?
  20. you all have made valuable points, the only problem im having is: if ip is key then it fails if timestamp is key then it fails if two people do it at the same time if there is no key then i end up with several entries of the same username if i use username as the key then the guests im trying to kep track of dont get counted right
  21. well if the key is the ip address, and they log in on another computer, then the ip address wont be correct, wht if i make it so there is no key?
  22. hmm what if i make the timestamp the primary key, will it still fail?
  23. hi everyone, im running a usersonline script, but it keeps giving me problems really bad, ive asked several times in the php forums, and now its time to ask here, because i think its something to do with the way im using the table in the database, you can see the script in action here: http://www.spyke01.mfhosting.com/forum/indexnew.php the error im getting is Error, update query failed UPDATE `usersonline` SET username='spyke01', timestamp='1129482508', ip='71.113.253.198', file='/forum/index.php' WHERE ip='71.113.253.198' OR username='spyke01' when i run it in phpmyadmin, i get: #1062 - Duplicate entry '71.113.253.198' for key 1 the database is this: CREATE TABLE `usersonline` ( `username` varchar(25) NOT NULL default '', `timestamp` int(15) NOT NULL default '0', `ip` varchar(40) NOT NULL default '', `file` varchar(100) NOT NULL default '', PRIMARY KEY (`ip`) ) TYPE=MyISAM; the actual code for this page is: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php $timeoutseconds [/span][span style=\"color:#007700\"]= ([/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]]) ? [/span][span style=\"color:#DD0000\"]\'2592000\' [/span][span style=\"color:#007700\"]: [/span][span style=\"color:#DD0000\"]\'1200\'[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$timestamp[/span][span style=\"color:#007700\"]=[/span][span style=\"color:#0000BB\"]time[/span][span style=\"color:#007700\"](); [/span][span style=\"color:#0000BB\"]$timeout[/span][span style=\"color:#007700\"]=[/span][span style=\"color:#0000BB\"]$timestamp[/span][span style=\"color:#007700\"]+[/span][span style=\"color:#0000BB\"]$timeoutseconds[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$ip [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$REMOTE_ADDR[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$currentuser [/span][span style=\"color:#007700\"]= ([/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]]) ? [/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]] : [/span][span style=\"color:#DD0000\"]\'Guest\'[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]// Add this user to database [/span][span style=\"color:#0000BB\"]$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM `usersonline` WHERE username = \'\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"\' OR ip = \'$ip\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$result [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]) or die ([/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]().[/span][span style=\"color:#DD0000\"]\"<br />Couldn\'t execute query: $sql\"[/span][span style=\"color:#007700\"]); if([/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) == [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) [/span][span style=\"color:#FF8000\"]//if NO results, add this user [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#FF8000\"]//not in db, so add them [/span][span style=\"color:#0000BB\"]$sql2 [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"INSERT INTO `usersonline` (username, timestamp, ip, file)\"[/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\"VALUES(\'$currentuser\', \'$timestamp\', \'$ip\', \'\"[/span][span style=\"color:#007700\"].[/span][span style=\"color:#0000BB\"]$_SERVER[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'PHP_SELF\'[/span][span style=\"color:#007700\"]].[/span][span style=\"color:#DD0000\"]\"\')\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql2[/span][span style=\"color:#007700\"]) or die([/span][span style=\"color:#DD0000\"]\'<br />Error, insert query failed\' [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$sql2[/span][span style=\"color:#007700\"]); } else [/span][span style=\"color:#FF8000\"]//if result found, run the rest of the script [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#FF8000\"]//in db, so update their info [/span][span style=\"color:#0000BB\"]$sql2 [/span][span style=\"color:#007700\"]= ([/span][span style=\"color:#0000BB\"]$_SESSION[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'username\'[/span][span style=\"color:#007700\"]]) ? [/span][span style=\"color:#DD0000\"]\"UPDATE `usersonline` SET username=\'$currentuser\', timestamp=\'$timestamp\', ip=\'$ip\', file=\'\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$_SERVER[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'PHP_SELF\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"\' WHERE ip=\'$ip\' OR username=\'$currentuser\'\" [/span][span style=\"color:#007700\"]: [/span][span style=\"color:#DD0000\"]\"UPDATE `usersonline` SET username=\'$currentuser\', timestamp=\'$timestamp\', ip=\'$ip\', file=\'\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$_SERVER[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'PHP_SELF\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"\' WHERE ip=\'$ip\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql2[/span][span style=\"color:#007700\"]) or die([/span][span style=\"color:#DD0000\"]\'<br />Error, update query failed\' [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$sql2[/span][span style=\"color:#007700\"]); } [/span][span style=\"color:#0000BB\"]mysql_free_result[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//free our query // Delete users that have been online for more then \"$timeoutseconds\" seconds [/span][span style=\"color:#007700\"]@[/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"delete from useronline where timestamp>$timeout\"[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]// Shows total users online as well as username [/span][span style=\"color:#0000BB\"]$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM `usersonline`\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$result [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]) or die ([/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]().[/span][span style=\"color:#DD0000\"]\"<br />Couldn\'t execute query: $sql\"[/span][span style=\"color:#007700\"]); if([/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) == [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) [/span][span style=\"color:#FF8000\"]//if NO results, stop the script & return the error message [/span][span style=\"color:#007700\"]{ echo [/span][span style=\"color:#DD0000\"]\"\nError reading usersonline table section 2.<br /><br />\"[/span][span style=\"color:#007700\"]; } else [/span][span style=\"color:#FF8000\"]//if result found, run the rest of the script [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); } [/span][span style=\"color:#0000BB\"]mysql_free_result[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//free our query //Find out whos online and if they\'re a user, make a link to their profile page [/span][span style=\"color:#0000BB\"]$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM `usersonline` WHERE username != \'Guest\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$result [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql[/span][span style=\"color:#007700\"]) or die ([/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]().[/span][span style=\"color:#DD0000\"]\"<br />Couldn\'t execute query: $sql\"[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$totalguests [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]- [/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$totalusers [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]- [/span][span style=\"color:#0000BB\"]$totalguests[/span][span style=\"color:#007700\"]; if([/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) == [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) [/span][span style=\"color:#FF8000\"]//if NO results, stop the script & return the error message [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#0000BB\"]$users [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"No registered users logged in.\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//add username to our list ^^ [/span][span style=\"color:#007700\"]} else [/span][span style=\"color:#FF8000\"]//if result found, run the rest of the script [/span][span style=\"color:#007700\"]{ while ( [/span][span style=\"color:#0000BB\"]$row [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_array[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) ) { [/span][span style=\"color:#0000BB\"]$sql2 [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM `users` WHERE username = \'$row[username]\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$result2 [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$sql2[/span][span style=\"color:#007700\"]) or die ([/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]().[/span][span style=\"color:#DD0000\"]\"<br />Couldn\'t execute query: $sql\"[/span][span style=\"color:#007700\"]); if([/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result2[/span][span style=\"color:#007700\"]) == [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) [/span][span style=\"color:#FF8000\"]//if NO results, stop the script & return the error message [/span][span style=\"color:#007700\"]{ [/span][span style=\"color:#0000BB\"]$users [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"No registered users logged in.\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//add username to our list ^^ [/span][span style=\"color:#007700\"]} else [/span][span style=\"color:#FF8000\"]//if result found, run the rest of the script [/span][span style=\"color:#007700\"]{ while ( [/span][span style=\"color:#0000BB\"]$row2 [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_array[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result2[/span][span style=\"color:#007700\"]) ) { [/span][span style=\"color:#0000BB\"]$users [/span][span style=\"color:#007700\"].= [/span][span style=\"color:#DD0000\"]\"<a href=\'$menuvar[PROFILE]&action=viewprofile&id=\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$row2[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'userid\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"\'>$row2[username]</a> \"[/span][span style=\"color:#007700\"]; } } [/span][span style=\"color:#0000BB\"]mysql_free_result[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result2[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//free our query [/span][span style=\"color:#007700\"]} } [/span][span style=\"color:#0000BB\"]mysql_free_result[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//free our query //Print out our nice table [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#DD0000\"]\"\n<center>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n<table class=\'forumborder\' border=\'0\' cellpadding=\'0\' cellspacing=\'1\' width=\'600\'>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <tr class=\'title2\' nowrap height=\'10\'>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <td><center><b>Online Stats</b></center></td>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n </tr>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <tr class=\'ncolour2\' height=\'10\'>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n <td>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#0000BB\"]$totalonline [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\" Users Online.<br /><br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//show total users [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$totalguests [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\" Guests.<br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//show number of guests [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$totalusers [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\" Users.<br /><br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//show number of users [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$users[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n </td>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n </tr>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n</table>\"[/span][span style=\"color:#007700\"]; echo [/span][span style=\"color:#DD0000\"]\"\n</center><br /><br />\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.