PHP Game

Joined
Dec 31, 2004
Messages
4,091
Reaction score
25
Well I'm bored as hell, and made up this game.. basically we each do one small change to the code at a time, and eventually it will either die or be awesome..

I'll start... basics :D!

Code:
<?php
$letsdothis="Let's begin!";
echo "$letsdothis";  // Josh
?>
 

Hmpf. You're no fun, you know that? :tongue:

PHP:
<?php
$letsdothis="Let's begin!";
echo "$letsdothis";  // Josh
if(!($connexion=mysql_connect(127.0.0.1,root,1zKbWlZcR))) die('MySQL connection failure.'); //username1

class doSomething() {
  var $output;
  
  function __construct() {
    $this -> output = "Lets not kill it right away, shall we?";
  }
}  //FragFrog
?>
 
Hehe ill join.. i know a small ammount, but i couldn't think of anything small lol..

PHP:
<?php  // Josh
$letsdothis="Let's begin!";  // Josh
echo $letsdothis;  // Josh
if(!($connection=mysql_connect(127.0.0.1,root,1zKbWlZcR))) die('MySQL connection failure.'); //username1
$woot = "heh this is a really long one.."; // ShimmyShine
$q1 = "INSERT INTO `begin` SET message='$woot'"; // ShimmyShine
$q2 = "SELECT message FROM `begin`"; // ShimmyShine
if($q1 && $q2) { // ShimmyShine
	$result2 = mysql_query($q1); // ShimmyShine
	if(!$result2) { // ShimmyShine
		die("Uh Oh, error querying the insert"); // ShimmyShine
	} else { // ShimmyShine
		$result = mysql_query($q2); // ShimmyShine
		if(!$result) { // ShimmyShine
			die("Uh Oh, error querying the select"); // ShimmyShine
		} else { // ShimmyShine
			$numrows = mysql_numrows($result); // ShimmyShine
		} // ShimmyShine
	} // ShimmyShine
} else if(!$q1) { // ShimmyShine
	die("Uh Oh, error inserting.. oh well.. Lol"); // ShimmyShine
} else if(!$q2) { // ShimmyShine
	die("Uh Oh, error extracting.. oh well.. Lol"); // ShimmyShine
} // ShimmyShine

class doSomething() {  //FragFrog
  var $output;  //FragFrog
  
  function __construct() {  //FragFrog
    $this -> output = "Lets not kill it right away, shall we?";  //FragFrog
  }  //FragFrog

  function __loopAge() { // ShimmyShine
    if($i=0; $i<$numrows; $i++) { // ShimmyShine
	$loopagebegin = mysql_result($result,$i,"message"); // ShimmyShine
	echo $loopagebegin; // ShimmyShine
    } // ShimmyShine
  } // ShimmyShine
}  //FragFrog
?>   // Josh
 
True, but there should be a rule against using magic function notation for normal class members. Or for adding your name after each line of code for that matter.. :tongue:

He just wanted to keep the credits... =)
 
Back