Search results

  1. W

    cookey problem :(

    I see what it's doing, but it should only be using the db to do that. Cookies are too volatile. But anyway, this should fix it: <?php if(isset($_REQUEST["seek"]) and !empty($_REQUEST["seek"]) and strlen($_REQUEST["seek"]) >= $CONFIG['search_minlength']) { $seek = $_REQUEST["seek"]; } else...
  2. W

    Port Forward help :3

    I'm a little confused. Are you saying that you're trying to set up a server? What are the models of your router and modem? And what is your internal IP address?
  3. W

    cookey problem :(

    It seems that $recherche is being set to the search text entered by the user. And it seems that a cookie is set for every search the user makes. But since I have no idea how this system works, I can't really recommend an alternative since I don't know what the effects will be. If you could post...
  4. W

    Rollover help needed

    I didn't mean the actual name of the image, I meant the name attribute of the <img> tag. Also, I didn't mean to say you should replace 'this' with the document.* format. Sorry for the confusion. What I meant was that there's no need to change anything at all in the html I provided except when...
  5. W

    Rollover help needed

    There's no need to change anything, except homeblue and homewhite which will change for the other images of course. 'this' is a keyword which refers to the current object. For instance, if you gave your image the name 'img1', this.src would be equivalent to document.img1.src.
  6. W

    Suggested 3D graphics card?

    The geforce 200 series and radeon hd 4000 series are being released over the next couple of weeks I believe. So if you can wait a month or so, you'll find the prices of previous generation gpu's to be significantly less.
  7. W

    url-rewrite HELP :-(

    The L flag just means that no more rewrite rules will be applied after that rule. Since there are no other rules here, it doesn't matter. But since you might add more later, it doesn't hurt to leave it. Anyway, that rule won't work exactly right. It won't work with the 2 other forms. Also, I...
  8. W

    Rollover help needed

    Your html should be: <a href="index.html"><img src="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/home.png" onmouseover="this.src=homeblue.src;" onmouseout="this.src=homewhite.src;" vspace="1" hspace="1"></a> Also, are you sure the if should be 'if (images)' and not 'if...
  9. W

    Javascript timer with php. Help Please. :D.

    If the game is balanced, the crons alone shouldn't be the main determining factor. For example, it looks like there's attacking(there's an army script), so people who play more often will get better pickings and be able to defend themselves better. And if you can steal resources through...
  10. W

    Show system/ picking a winner?

    I made a slight error in that example query actually, it should be <= instead of <. Anyway, to match that query, you would make a table named 'levels' and give it at least 2 fields called 'level' and 'requirement'. 'level' would probably be the primary key and auto-increment, and 'requirement'...
  11. W

    Javascript timer with php. Help Please. :D.

    Yeah, but what I'm saying is that people will just end up staying logged in 24/7 and keeping the page open if he does it like that. So what's the point? He'll just end up with people complaining that it's unfair because they can't keep their computer on all the time like other players. Might as...
  12. W

    PHP command creation help

    Yeah, you can take out the <br />'s and just put a <pre> around the if block. I was just basically copying what you were using.
  13. W

    PHP command creation help

    Try using just one echo statement and the heredoc syntax: echo <<<COMMAND if (command.equalsIgnoreCase("$cmdname") && playerRights >= $rights) {<br /> addItem("$itemid", "$itemamount");<br /> sendMessage("$msg");<br /> } COMMAND; Remember that a heredoc's closing line(COMMAND; in...
  14. W

    Password hash

    I prefer using sha256 myself, which you can use through the hash() function: hash('sha256', $string); Rehashing passwords does add some security, although salting is arguably better. Then again, there's nothing stopping you from combining the two.
  15. W

    Show system/ picking a winner?

    Well according to the "rules" of databases, you shouldn't store values which are the results of calculations based on values which are already stored unless the calculation is time consuming. This helps to minimize db size and ensure data doesn't get stale. Since totaling the stats is very...
  16. W

    PHP - Who's Online Script Help

    Most often this is done with a field which stores the timestamp of the user's last action. In every page, a query should execute(usually from an include()'d script) which updates the last action field for the user with the time of their current action. Like this (assuming $userid holds the...
  17. W

    Javascript timer with php. Help Please. :D.

    Why not use a cronjob for this(that is, having a script which automatically executes every so often)? If it's because you only want the wood to increase while this page is open, then what's to stop people from just leaving the page open 24/7? Otherwise, I would recommend increasing the time...
  18. W

    Show system/ picking a winner?

    Personally, I wouldn't use a temporary table or anything like that. I would just add a new field to the pets table called 'entered' or something, which would hold a value of either 0 or 1 for false and true respectively(an enum type could be used for that, but any int type would work fine too)...
  19. W

    Equaling in php

    You need to move the php code to the top of the file and make sure that there's no output before you send the header. But this also means that you can't echo that message in the same way unless you want it to appear at the top of the page. Try it like this: <? $msg = ''...
  20. W

    PHP Form for Clan

    Well, after looking at the php nuke source code for a bit, I wrote out a nice detailed explanation here about how to go about doing that. It took a while, but I prefer to post answers here than to discuss it privately so that other people with the same problem can find an answer. But then...
Top