Jump to content

Yeodan

Members
  • Posts

    75
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Yeodan's Achievements

Member

Member (2/5)

0

Reputation

  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. 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
  6. 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
  7. 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
  8. 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
  9. I think I speak for everyone here: What's a ticker tape?
  10. yep float left should work here wrong forum btw
  11. 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
  12. I only read the first part, didn't even look at the code but something like this? if (releasedate > currentdate) { echo ... }
  13. 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?
  14. 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?
×
×
  • 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.