Jump to content

cmgmyr

Members
  • Posts

    1,278
  • Joined

  • Last visited

    Never

Everything posted by cmgmyr

  1. Check this out: http://www.colorschemer.com/schemes/
  2. no... \t inserts a new tab (cell to the right) and \n drops to a new row (record)
  3. My main Dev PC I built with an Intel Duel core CPU, 3 gb of ram and 256mb of vid ram, (2) 250 gb sata hd's and some other misc stuff here and there. Attached are 2 dell 20.1" widescreen monitors. I also have a new laptop (dell D830) that I do some testing on. ...XP Pro can accept up to 10 external monitors with no extra configuring...just insert the video cards and away you go!!!
  4. Well you have to record each vote or else you can really check if the same one has happened. I use something like this for one of my sites: Votes: -------- id userid voterid vote I guess if you are talking about millions of votes you could make multiple tables to handle different userid's: votes1 (handles users 1-1,000,000), votes2 (handles users 1,000,001-2,000,000), etc... So when you vote for someone your script does a simple IF then finds what table it needs to look for...then does the rest.
  5. #wrapper{ width:400px; margin:0px auto; } #div1{ width:200px; float:left; } #div2{ width:200px; float:left; } <div id="wrapper"> <div id="div1">Something here</div> <div id="div2">Something else here</div> </div>
  6. Check the "power schemes" and make sure your "system standby" is "never"
  7. no, don't use that. use: #page_wrapper{ margin:0px auto; width:800px; } ...just change the width to whatever you need.
  8. Dreamweaver does a lot better then FrontPage. But you should hand code your HTML/CSS. Once you learn how to make CSS layouts (if you haven't already) you can whip out a CSS layout pretty quick and it looks a lot better then HTML tables.
  9. Sorry, read too fast. How is the date entered into the database?
  10. Use NOW() $update = "UPDATE your_table SET something = 'something', last_update = NOW() WHERE userid = $userid";
  11. hey, no problem...happens to the best of us!
  12. cmgmyr

    Scrollbar

    I believe you can only change the colors of the scrollbars (of the browser) in IE. If you want to make "custom" scroll bars for something like a div you will need to use some CSS with javascript.
  13. You could do something like this: form.php <?php if($_POST){ //do what you need with POST here header("location: form.php?alert=1"); } if($_GET['alert'] == 1){ echo "Everything has been uploaded! Please upload some more!<br /><br />"; }
  14. SELECT * FROM `your_table` WHERE this = this ORDER BY `your_column` DESC OR SELECT * FROM `your_table` WHERE this = this ORDER BY `your_column` DESC, `your_second_column` DESC
  15. Ok, so I figured it out. Here it is if anyone wants to do something like this. 1. make a "logged_time" column somewhere in your database (I put this in my users table) 2. When they log in do something like this: <?php $_SESSION['user_id'] = $userid; $_SESSION['online_time'] = mktime(); ?> 3. On the top of each page...or in your header file have this: <?php if(getUser()){ //<- this checks to see if the user is logged on...you can do this anyway you want onlineTime(); //<- this alters/saves the online time } ?> 4. Here are your main functions <?php //This function logs the time into the database and makes a new time function onlineTime(){ //Make DB connection here $timeout = 5; //this is the timout in minutes $userid = $_SESSION['user_id']; $now = time(); $difference = $now - $_SESSION['online_time']; if($difference <= ($timeout * 60)){ mysql_query("UPDATE users SET logged_time = logged_time + $difference WHERE userid = $userid"); } $_SESSION['online_time'] = mktime(); } //This function calculates and outputs the logged time function showOnlineTime($userid){ //Make DB connection here $result = mysql_query("SELECT logged_time FROM users WHERE userid = $userid"); if(mysql_num_rows($result) > 0){ list($total) = mysql_fetch_row($result); $days = floor($total / 86400); $hours = floor(($total % 86400) / 3600); $minutes = floor(($total % 3600) / 60); echo "$days days, $hours hours and $minutes minutes."; }else{ echo "No Logged Time Available"; } } ?> Simple enough right?
  16. CSS is very simple, yet very powerfull at the same time. As TM said you can learn CSS in a few days, and you can pretty much master it in about a month or so (or atleast be really good at it). Look at a bunch of examples online and you will get the hang of it.
  17. It's something I use for the "owner" of the video/picture/whatever. If status is set to 0 then the owner didn't view it yet. Once they view the comment(s) then this is set to 1. It's up to you if you use this or not. If you don't you can just take it out of the query.
  18. You only need 1 comments table. This will have the comment id, user id, video id, comment, and whatever else you want like date left or status CREATE TABLE `comments` ( `cid` int(11) NOT NULL auto_increment, `userid` int(11) NOT NULL default '0', `videoid` int(11) NOT NULL default '0', `message` text NOT NULL, `status` smallint(1) NOT NULL default '0', `date` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`cid`) );
  19. Sorry, it's been a long week and I can't seem to wrap my head around this. I'm sure I'm making this more complicated then it should be. Any examples of what I could do? Thanks
×
×
  • 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.