Americans Challenge The Almighty God

Posted by Guncannon @ 8:13 am
Category: Humor

Ever complain about god is being unfair or bringing disasters to the world? I do believe some people actuall do that some time in their life. But here is a senator from Nebraska state in America probably went a lot further than anyone about that. Read more »


Mewtwo Papercraft

Posted by Jetlogs @ 11:13 pm
Category: Papercraft, Video Games

Mewtwo Papercraft TemplateWhat’s a Mew Papercraft without a matching Mewtwo one? Well here is another chokipeta pokemon template featuring #150, Mewtwo.

Nothing beats the original legendary.

To download the paprecraft template, just click on the image on the right. Then its just a matter of constructing the papercraft from the printed template

Enjoy :)


Halo 3 Leaked Ending

Posted by Jetlogs @ 3:39 pm
Category: Video Games

Today has certainly been a week of spoliers. And Halo 3 is no exception. An ending spoiler has been leaked 8 days before its official release date on Sept 25. Is it real or is it fake? You decide:


Super Mario Galaxy… Ruined

Posted by Jetlogs @ 2:51 pm
Category: Humor, Video Games

Want to know a secret from the upcoming Wii game called Super Mario Galaxy that can ruin the game’s image for you?

Super Mario Galaxy Box Art
If you don’t want it to be spoiled, you can turn away now at this point. But for those who have the guts, you can just read the rest of the article Read more »


PHP: How to Make Life Easier with References

Posted by Jetlogs @ 8:30 am
Category: PHP, Web Development

Don’t you just hate it when you have to write very long codes such as below?

$name = mysql_real_escape_string(strip_tags($name));
$email = mysql_real_escape_string(strip_tags($email));
$address = mysql_real_escape_string(strip_tags($address));

Even if you created a function to make coding easier, it can still be a little bit tedious:

function escape_mysql($string)
{
	return mysql_real_escape_string(strip_tags($string));
}

$name = escape_mysql($name);
$email = escape_mysql($email);
$address = escape_mysql($address);

I’ll demonstrate a simple technique to make your life easier by using PHP’s references. By passing variables by reference, we can get rid of the variable assignment on the function’s return value. Here is how if should look like in the end:

function escape_mysql(&$string)
{
	$string = mysql_real_escape_string(strip_tags($string));
}

escape_mysql($name);
escape_mysql($email);
escape_mysql($address);

By passing variables by reference in our escape_mysql() function, the variable assignment no longer becomes necessary since the function will do it instead. Now that is a lot more easier to code and understand isn’t it?


« Previous PageNext Page »
  • Archives

  • Donations

  • Social Bookmarks

  • Jetlogs.org
    Some Rights Reserved 2007
    Creative Commons License