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 »
19Sep
18Sep
Mewtwo Papercraft
What’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 ![]()
17Sep
Halo 3 Leaked Ending
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:
16Sep
Super Mario Galaxy… Ruined
Want to know a secret from the upcoming Wii game called Super Mario Galaxy that can ruin the game’s image for you?
![]()
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 »
15Sep
PHP: How to Make Life Easier with References
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?








1 Comment

