AJAX Tutorial: Hangman Game (no database required)
Last year I made an PHP tutorial of an OOP Hangman game (no database required) for a Siminar I spoke at. This year as a part of my new Game Tutorial Series I’m adding...
lang="en-US">
Last year I made an PHP tutorial of an OOP Hangman game (no database required) for a Siminar I spoke at. This year as a part of my new Game Tutorial Series I’m adding...
I hate hard coding enums so you can use this script to get the enum values directly from the table schema. That way if you add or change them you don’t have to go...
I found this cool site that has examples cross-referencing PHP and ASP so you can see the difference (or use it if you’re switching from one language to the other). They also have a...
So this one isn’t really a tutorial but it gives you a good idea how you’d go about changing the colors of pictures dynamically. To get the big picture on how you might use...
Here are a few fun functions for word games, word scrambling and just plain word craziness. <?php /*********** * Purpose: move a certain letter to a certain position * Precondition: word, letter to move,...
This assumes you have cPanel and permission to run the /scripts/addpop command. You’ll need to write functions for validateUsername, validatePassword, and usernameExists or you can click on the links for each of those and...
<?php /**************** * Purpose: mix two colors together * Precondition: two colors in hex RGB format * Postcondition: a single color returned that’s the combo of the two ****************/ function mixcolors($color1, $color2) { $c1_p1...
<?php /**** * Purpose: get the filename from the path * Precondition: path i.e. http://domain.com/contacts.php * Postcondition: returns the filename i.e. contacts.php ****/ function fileName($path) { return substr($path, strrpos($path, ‘/’)+1, strlen($path)); } ?> Programming...
<? /************** * Purpose: Format dates with country in consideration * Precondition: 2 letter country code the individual is from * Postcondition: date is reformatted for that country * Note: all available country abbreviations...
In MySQL with PHP: <? $delimiter = “, “; $count = 0; $loop = mysql_query(“SELECT S.suffix FROM people P INNER JOIN surnames S on P.suffix_id = S.id”) or die (‘cannot select merged data’); while...