Archive for July 16th, 2008

16
Jul

Ever wanted to create a simple hit counter for your site, but never had the chance to code it yourself? Then, you may simple use the code below — all hard coded by me, royalty-free. The code is used to teach non-techie people how to create PHP-MySQL-driven websites.

<?php
// connect to the MySQL server using 'localhost' as the server name, cPanel username & password
$con = mysql_connect("localhost","cpanelusername","password");
// check if the connection is established or not
if (!$con)
   {
      die('Could not connect: ' . mysql_error());
   }

// continue with the database processes if the connection is successful
else
   {
      // select the database you wish to connect to
      mysql_select_db("ctrdbase", $con);
      // go to the last record in your database table, this will also be the last number
      $result = mysql_query("SELECT * FROM counter_table ORDER BY ctr DESC LIMIT 1");
      $row = mysql_fetch_array($result);
      // store the last record to a variable
      $cctr = $row['ctr'];
      // declare a new variable that will do the addition thing
      $nctr = $cctr + 1;
      // store the updated counter to the database
      $sql = "INSERT INTO counter_table (ctr) VALUES ($nctr)";
      $dbupdate = mysql_query($sql);
      echo $nctr;
   }
mysql_close($con);
?>

Popularity: 29% [?]

16
Jul

To: Mr. Bayani Fernando
Chairman, MMDA

Dear Mr. Fernando,

I can’t help but wonder why floods are still everywhere within the Metro Manila area during a down pour, even if your office had already spent millions of tax payer’s money cleaning the estero’s and rehabilitating the pumping stations. I grew up in the same street where I am living now, and I can only remember once or twice (at most) wherein our street got flooded due to heavy rains — take note, “heavy rains”.

But now, it is very much different: the entire street gets flooded after a 20-30 minute rain. No, I am not complaining because I am against you, but I do not see my money’s worth in the way your office handles flood control.

Another thing, was it really necessary to have your face posted in every tarpauline that your office will post in the streets? True public service need not to have a face — people need not to know who leads what agency or office, as long as they are doing their jobs (right). Same goes with the “BAYANI” stickers pasted on almost all buses plying the avenues of the metropolis — is it a necessity?

I am not sure if you are very much aware of how much each tarp poster or sticker cost, but I do not think they are helping in the improvement on how Metro Manila looks from the eyes of a citizen.

Thanks for your time reading this letter. More power, and I do hope to see less of MMDA tarps with your face in the very near future.

Best regards,

BobReyes.com

Popularity: 29% [?]

16
Jul

WordPress users, upgrade to WP 2.6 now! Don’t know where to download it? Just head on directly to http://www.wordpress.org

Enjoy! Don’t upgrade and you will be missing a lot of things.

Popularity: 23% [?]


 Powered by Max Banner Ads