Looking for Something?



Content:

Category:





I Like Pink

Print All MySQL Database Tables & Fields Using PHP on 1.13.2009 - <?php //connection variables $database = "your_db_name"; $user = "your_username"; $pass = "your_pass"; //connection to the database mysql_connect($host, $user, $pass) or die ('cannot connect to the database: ' . mysql_error()); //select the database mysql_select_db($database) or die ('cannot select database: ' . mysql_error()); //loop to show all the tables and fields $loop = mysql_query("SHOW tables FROM $database") or die ('cannot select tables'); while($row = mysql_fe...

SQL Server 2005, Select All Tables & Fields on 1.13.2009 - SQL: select table_name, column_name, data_type, character_maximum_length, is_nullable from information_schema.columns where table_name in (select name from sysobjects where xtype='U') order by table_name...

Contract PHP/MySQL Programmer Needed on 11.25.2008 - Are you passionate about games?!? Like animals? Do you live in Northern Virginia? Then perhaps you're the person I'm looking for. My name is Jade and I started programming my first game when I was only 13. Today it has over 100k members and it's still growing!! Only I can't keep up with it anymore, and that's where you come in. Job Description I'm looking for someone in the Northern Virginia area whose interested in game programming on a contract basis starting in January 20...

GameFrenzi Image Uploader/Manager on 11.6.2008 - Started working on the GameFrenzi uploading script and image manager and ran into a snag. Turns out you can't grab the file you're uploading and use Ajax unless you use an iframe. This sets the entire project back as we re-work the image processing code. Hopefully this tutorial will help....

Lesson 7: Pits of Doom -- Join, Login & Lost Password on 9.25.2008 - In the last lesson we created a database class to make doing queries quick and easy to handle. Then we converted over the current character file and map editor to use the database when storing/retrieving information. Finally, I added an additional file so you could import your map.txt files into your database from any you made in the previous lessons. Now it's time to make our game start to feel like a real game. In this lesson we'll create two new classes, a member's class and a character's ...

Lesson 6: Pits of Doom -- MySQL Database Class on 9.18.2008 - In the last lesson I introduced you to functions, reading & writing to a file, some simple javascript and adding features to the game so we could swap in/out maps and move up/down map levels. Now this is all fine and dandy, but we live in the age of databases so it's time to pull out your thinking caps. Let's get busy converting everything we've done so far to a database. Lesson Concepts MySQL Basics ...

Lesson 5: Pits of Doom -- Easy Map Editor on 9.18.2008 - In the last lesson we made some real progress. Now, instead of having a boring page with a click of one button before the game is over, we have a character that can move around a much larger area, be blocked by walls, fall into pits and die, and then win if they find the treasure. That's all fine and dandy but our game needs more substance. It's time to add more maps, map levels, and our very own easy map editor so we can quickly make maps, generate map files, and play our game with a whole n...

Lesson 4: Pits of Doom -- And Array We Go on 7.19.2008 - In the last lesson we covered how to create a function, how to use some of php's built in functions, and how to deal with sessions. Now we'll take it even a step further. If you've tried the little game we have setup right now you'll agree with me that's its not only boring, it's really REALLY boring. Right now you can click one button and either win or loose the game. In the big scheme of things we want our character to walk around different maps, moving from place to place as well as fighti...

Lesson 3: Pits of Doom -- Mixing Things Up on 7.16.2008 - In the last lesson we covered how to make a form, check to see if a button has been pressed, and display a message according to whether the user found the treasure or not. Now it's time to take our very simple navigation page to the next level: random treasure location. In our final game, the position of the treasure will be pre-determined by data in our database. However, we won't know what position the treasure is in as the user is navigating their character around the game because this inf...

Lesson 2: Pits of Doom -- Breaking It Down on 7.14.2008 - One of the best things to do if you've never made a game before or you don't have much programming experience is to break things down into their most basic parts. We'll start off making this game by doing some really really simple programming and then adding functionality until the game is complete. It doesn't look like much now, but at the end of this tutorial you'll be able to download a fully working version with an installation file that you can use under the GNU public license to modify and...

Lesson 1: Pits of Doom -- the planning stage on 7.10.2008 - Before you start any kind of online game you need to take a minute to sit down and consider some of the following questions: What is my game called? What is my target audience? Can I afford the cost and time of manging my own game? Am I good at working with people? What competition already exists for the game I'm going to make? How will my game work? It's All In A Name A name can make or break a g...

Free Multiplayer PHP/MySQL Game -- Pits of Doom on 6.30.2008 - About a month ago I started giving someone PHP/MySQL lessons. In the lessons I made up a little game to teach the guy how to do different things in PHP all the way up to making his own multiplayer online text-based game. So in the next few months I'm going to share insights on creating your own PHP/MySQL game by posting the code for this little game under the GNU public license. That way you're free to edit/update and change it as you see fit. If you'd give me credit for it (or at least keep the...

Blue Imp Ajax Chat Modifications on 6.10.2008 - Here are a bunch of modifications I'm working on for the Blue Imp AJAX chat I've started using for all online games. If these are not available on your AJAX chat at the time it was originally installed you can have these modifications upgraded free of charge once they're done. Admin Panel designate moderators, and other chat administrators view/edit banned list make your own custom style sheets upload and delete emoticons and sound...

Learning PHP (Part 3) on 5.3.2008 - In part 2 I covered else-if statements and more complicated if statements. One of the other concepts that's essential to learning any kind of programming is loops. There are three different types of loops (while loop, for loop, and do while loop), but I'm only going to cover two of them here. While Loops The concepts of loops is extremely simple. While some condition is true you're going to run the same bit of code again an...

Useful PHP Functions on 3.8.2008 - I ask myself why type the same thing over and over again when you can just use one function call? I've seen a lot of people do that, so stop it! Save yourself the trouble. Here are some things I use a lot: <?php /**** * Purpose: return a formatted error message * Precondition: the message to display * Postcondition: formatted message echoed to the screen ****/ function errorMsg($message) { return "<span class=\"errorMsg\"><center>Error: " . $message . "</cente...

Connecting to a MySQL Database Using PHP on 3.1.2008 - You would think this is really obvious but I see a TON of posts on devnetwork.net (great php/mysql site) where people include their database login/password in every page from a non-protected directory. Big no no! So, here's the low down on how to setup a connection to a mysql database using php and keep your login protected. First, you'll need a database, php, and a place to host both. Once you have those you're ready to go. 1) You want your login for y...

XAMPP: Learn PHP & MySQL Without Online Hosting!! on 3.1.2008 - One of the questions I get most frequently is what I use to make my text-based games. My answer is always the same, PHP and MySQL. Let's say you wanted to learn these languages, so you find some tutorials and start reading. Only now you realize you need somewhere to practice what you've learned. Hosting can be expensive, especially for hosts that come with PHP/MySQL for someone who only wants to play around with the languages and isn't looking to develop and entire website. XAMPP is your solu...

Learning PHP (Part 2) on 2.23.2008 - In part 1, I talked about requirements for php, creating a file, variables, and if-else statements. Now on to harder concepts. Else-If Statements Before we covered the if-else statement. In an if-else statement if something is true take some action, otherwise do something else. The else-if statement builds on the power of an if-else. Look at this example: <?php $money = 20; $bread = 5; $candy = 5; $cake = ...

Learning PHP (Part 1) on 2.5.2008 - When the Internet exploded in the .com age people were just starting to realize the potential of online programming languages. PHP, or Hypertext Preprocessing, is one of my favorite programming languages. One of the best things about PHP is that it's easy enough for people to learn even if they've had little to no prior programming experience. It's weakly typed so beginners don't have the additional complexity of trying to put strings in integers, or understand the difference between a double an...

19 results found