Jump to content

Yeodan

Members
  • Posts

    75
  • Joined

  • Last visited

    Never

Everything posted by Yeodan

  1. Is there a way to change the submit button of a form into a regular link using a css class for the button?
  2. Is it possible to add a text box on a page and send the value with GET together with another value to the next page? I could easily do it with a form and add a send button, but I prefer a text link, or can I just use a text link in a form?
  3. <div valign=bottom>more text</div>
  4. I'm having some trouble normalizing my database. I think everything is where it's supposed to be, but I'm not entirely sure. I'm making a MMORPG browser game. Meaning I will have a lot of players. There will be diffrent places in my game, a player can have a storage in each location. In that storage a player can store items, a player can also have items in his backback or items equipped. Items can also be moved between location or equipped/unequipped, stored/unstored, ... Each location has a limited capacity of items it can hold. There are 3 main diffrent types of items, weapons, armor and other items. Weapons have 2 types, 1 hand and 2 handed. Armor has quite a few types, head, body, hands, feet, ... other items don't have types, just names So this is what I have: table Items itemNumber (unique value and primary key) playerNumber (the unique number of the player) itemName (the name of the item) itemType (weapon+type/armor+type/other) itemPlace (backpack/equipped/location) itemSize (the size of the item) itemQuantity (how many of the item the player has) table Armor itemNumber itemDefense table Weapons itemNumber itemMinimumDamage itemMaximumDamage itemSpeed itemRange itemLevel
  5. html has an image resize tag
  6. what's the easiest way to do this? in one spot I need to add 20 seconds to the current time in another spot I need to add 2 minutes to the current time the easiest method seems to be date() + 20 but I'm not sure wether that'll work, probably not $date = mktime(date("H"), date("i"), date("s") + 20, date("m"), date("d"), date("y"); I need to compare $date to a mysql timestamp, so I'm not sure wich format to use or even wether I should use a timestamp in my mysql database or some other format there too the purpose of the function is to check wether the date + added time has already passed or not, so I need a full date, not just the time
  7. http://be.php.net/manual/en/control-structures.for.php http://be.php.net/manual/en/control-structures.if.php http://be.php.net/substr http://be.php.net/strlen if you understand those you know how to do it if not, loop trough every character in the string if the character is a " " (space) you know the next word begins add a counter that counts wich word you're at add more counters to know where the word starts and ends add the words you need to the new string
  8. you have to make 3 divs one for the image one for the text next to the image (float this left) (you might have to clear here) and one for the big text
  9. php is server sided, I don't think it has a way to do that you want to show you stuff client sided, html has some function like that though you can however implement your php variables in the html code or implement the hmtl code in your php code :x can't really help you any further on this sorry
  10. I think I speak for everyone here: What's a ticker tape?
  11. yep float left should work here wrong forum btw
  12. it's something that's hard to explain and even harder to understand I havn't seen any guide that explains it correctly, but I havn't looked at a lot of guides either I'd explain it like this: An object is a 'thing' that contains variables each containing their own variables Say we have an object 'tree' tree can contain a variable like 'apple tree' then the variable apple tree can again contain multiple variables like 'tree size' 'number of leafs' ... I'm not even sure wether this is 100% correct, but it should help you understand it a bit better, it's really hard to understand though edit: I actually think the variable 'apple tree' is the object, not the class? that contains apple tree
  13. I only read the first part, didn't even look at the code but something like this? if (releasedate > currentdate) { echo ... }
  14. will this work? require $location . "/link.php"; if not will it work if I do this: require "" . $location . "/link.php"; if not how can I make this work?
  15. I'm making a text based mmorpg. If I want to save a player's location in a session variable, can the players abuse this? Say I do this when a player logs in: Where $location is retrieved from a database. $_SESSION['location'] = $location; From there I'd just use the session variable and when the player changes location write that to the database and change the session variable. Now is it possible for a player who knows how these things work to hack the session variables and change them to some other location? And how would I fix this? Just retrieve the location from the database every time or is there some other way to secure this?
  16. How do I make php generate a random number with two numbers behind the . for me? I have this: $min can be something like 1 or 1.58 $max can be something like 2 or 2.58 $damage = rand($min, $max);
  17. so what if some registered player looks at his cookie and replaces his number with a random other number? he'll have access to the other account ... my sessions use: session id, player number, player ip for the cookies I just want to use the player number and password and I want the cookie to handle the login in stead of the form so ppl don't have to log in each time they visit the site
  18. there's quite a lot of code in front of it, why? what conditions should be met to be able to set a cookie? yes I've heard of sessions, my site uses sessions to log in users I want to use cookies to remember the user next time he wants to play
  19. How will I validate the user without the password? I can't just let anyone who has a cookie log in, cookies are easy to make!
  20. I'm also getting this weird error: Warning: Cannot modify header information - headers already sent by (output started at /home/mortalas/public_html/login.php:7) in /home/mortalas/public_html/includes/login.php on line 110 line 110: setcookie("MApNumber", $number, time()+32000000);
  21. then how should I make a login cookie if I can't include the password?
  22. Some login cookie questions: It seems impossible to store more than 1 value in a cookie, is this correct? So I have to make multiple cookies to store multiple values? What values should I store in my cookie? I'm making a MMORPG browser game. I think I need player name + password, wich are both required to log in. Is this correct? Is it safe to store the password in a cookie? Should I encrypt it or not? If I encrypt it, is that safe? Doesn't sound very safe to me either way.
  23. There seem to be several ways to get a user's IP, wich one should I use? I'm making an MMORPG brower game but I'm not an expert on IP tracking
  24. I'm making an MMORPG browser game. Players need to log in, I use sessions for that. For now I just use the player number, but I'm planning on using the encrypted password, ip adress and session number too. Should I check this information on every page? If not, when / where should I? Also is it smart, if it's even possible, to change the session id on every page? If not, when / where should I?
  25. Yeodan

    MYSQL Like

    you can use wildcards in SQL like * or ### * meaning any possible set of characters ### meaning any possible 3 characters ... google for sql wildcards
×
×
  • 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.