Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. Just one more thing, make sure each step describes only one thing (not 2 or more things, like read stuff, write stuff and more stuff)
  2. What kind of projects (short description)? What exactly do you have trouble with? If you have trouble figuring out how a certain procedure should run it's best to start with a piece of paper and describe each step until you have all steps covered or you have a very good idea of how it should be made. Something like: Main Path: 1. Read the XML file 2. Parse the XML source 3. Retrieve one record 4. Store the record in the database 5. Go to 3 until all records are in the database 6. Finished Alternate Paths: 1.1 Validate the XML file 1.1.1 If the XML file is invalid, show a warning and go to #6 2.1 Validate the record 2.1.1 If the record is invalid, show a warning and go to #3 4.1 If the INSERT failed, show a warning and go to #3 In the main path you assume everything just works nothing wrong happens, in the alternate paths you consider problems and other stuff. This keeps your main path to-the-point.
  3. Get their e-mail from the database and send them an e-mail whenever a new post is made. You unsubscribe them by setting a certain field to a certain value (that's as vague as it gets).
  4. LOL luckily it will only take around 7 months years to get an answer and it may as well not be answered at all. But as Mchl said he is the "CEO" of the phpfreaks But in all honesty I have had times where I thought a few of the replies made by staff (and others) were rude while they actually never meant to (except Daniel ), it's just this darn emotion-less state of the internet and thorpe finds emoticons childish while they could aid him well
  5. If you search the forums you'll find that this question has been posted many times and every time they give the same answer: you can't protect such material as in order to view the video you need to download it!
  6. $phpLiveDocx->setLocalTemplate('path/to/template.docx'); file_put_contents('path/to/document.pdf', $document);
  7. Are you saying his wife is a dummy!? Yes I am. What are you gonna do about it?
  8. You create a thread to ask for help, not solve your own question. We are otherwise pretty obsolete. Just imagine: SomeDude The current US president on: Today at 12:30:22 AM I was wondering who is the current US president??? SomeDude Re: The current US president on: Today at 12:40:28 AM Barack Obama Now imagine the entire forum being like this.. SomeDude str_split on: Today at 12:30:22 AM What does str_split() do? SomeDude Re: str_split on: Today at 12:40:28 AM You friggin n00b RTFM idiot lam0r stup*d f*ck http://lmgtfy.com/?q=php+str_split
  9. $result = mysql_query("SELECT id FROM logs WHERE id > {$_SESSION['ID']} ORDER BY id DESC LIMIT 1"); if(false !== $result && 0 !== mysql_num_rows($result)) { list($id) = mysql_fetch_row($result); echo $id; } else { echo $_SESSION['ID']; } mysql_query('INSERT INTO ..'); $_SESSION['ID'] = mysql_insert_id();
  10. Building a Web Site for Dummies
  11. FRRIIIIEEETTTEEEEENNNNNN !!!* (*) dutch for French fries (in a somewhat wordy fashion)
  12. Wasn't that what you wanted? ITs perfect I 2 can haz cool title?
  13. Drop the <table> and use a <div> instead. Float all child <div>'s, they'll auto cut-off on 6 elements. <div id="main"> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> </div> #main { width: 720px; } .box { float: left; margin-left: 20px; width: 100px; }
  14. Is Facebook a good idea? Just joking. Sure, I don't see any problems with this, security-wise you would need to validate any input but this goes for everything you build.
  15. I assume that like most RPG's you have a screen with slots where you can drag/drop a weapon/shield/helmet/.. which has a number of fixed slots for each player: character (character_id); weapon (weapon_id) challenge (attacker_id, defender_id) character_equiment (character_id, .., slot_prim_weapon_id, slot_sec_weapon_id, ..) character_equipment table is what I call a "config" table, it holds references to different other tables, like: character_id, slot_helmet_id, slot_shield_id, slot_prim_weapon_id, slot_sec_weapon_id, slot_ring_id 1 , 3 , 5 , 15 , 2 , 7 A join on this table will give you all of the player's equipment. I am not an advanced DB modeler so some other members may have a better way of doing this. An example query would be: SELECT .. FROM challenge AS c JOIN character AS p1 ON p1.character_id = c.attacker_id JOIN character_equipment AS e1 ON p1.character_id = e1.character_id JOIN weapon AS w1 ON w1.weapon_id = e1.slot_prim_weapon_id JOIN character AS p2 ON p2.character_id = c.defender_id JOIN character_equipment AS e2 ON p2.id = e2.character_id JOIN weapon AS w2 ON w2.weapon_id = e1.slot_prim_weapon_id Which would get your 2 characters and their weapons.
  16. In Psychology they told me that everyone is in a group even if they aren't actually in a group, they are part of the group-less group. So not having a title makes you part of the title-less. A great group, full of spirit (and stupidity) I am part of it for years now, nice to have you on board cheers
  17. IMO, I would find a different day job. Helping people online = under appreciation all over the place. I mean, how many times have people actually thanked you and baked you some cookies for fixing their problem? Maybe 1/8th of the people you actually helped? If it is more than that, that should be appreciation enough! Somehow I look (or sound?) like an alcoholic as they always want to buy me a beer.. No one ever bought me one, so I came up with my nifty signature ... which isn't working (partially) either but at least they stop telling they'll buy me a beer.
  18. Well I thank you, your insights are truly wonderful in divers area's
  19. Or try Eclipse PDT, NetBeans PHP, or PHPStorm. I use the latter and is free for educational and open-source projects, $48 for a personal license.
  20. Yes as PHP is easy to learn, but hard to master.
  21. ignace

    XML createElement

    addElement() should be appendChild()
  22. $result = mysql_query("SELECT UPPER(email_add_public) FROM members WHERE login='{$_SESSION['SESS_LOGON_NAME']}'"); if(false !== $result && 0 !== mysql_num_rows($result)) { list($email_add_public) = mysql_fetch_row($result); switch($email_add_public) { case 'NO' : echo 'NO'; break; case 'YES': echo 'YES'; break; } } else echo('No such record');
  23. ignace

    XML createElement

    $doc = new DomDocument(); $doc->formatOutput = true; $root = $doc->createElement('rss'); $root->setAttribute('version', '2.0'); $channel = $doc->createElement('channel'); while($row = $connection->fetch_assoc()) { .. $channel->addElement(..); } $root->addElement($channel); $doc->addElement($root); echo $doc->saveXML();
×
×
  • 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.