Tuesday 26 March 2013

Let's go for a ride - On our way to Mokhotlong, Lesotho

...this isn't a waterfall!
A few minutes out of the Butha-Buthe town, you come across this beautiful scenery. Call it whatever you may, but it's certainly not a waterfall! During winter, the water falling here freezes! 
Keep driving!
Drive a few kilo-meters, caution-speed kills, so you better be careful!

Oxbow Lodge
Need a rest? The Oxbow Lodge will keep you refreshed as you continue with your journey. You better stop by!

120kmh, I guess!
Step on that accelerator harder, the ain't no pot-holes! Before you think, you will have gone some distance.

Go snow skiing!
To add a little adventure, there's a snow skiing dwelling down the hill. It's a few minutes drive to the resort. Remember, it will surely not be free down there, prepare some cash!

Waving flags...
Glance out the window -not at the rear mirror- you see the Lesotho, South-Africa and some other flags waving, it's a beautiful scenery!


Are we there yet?  A resounding, NO! Be patient, we still got a few more kilos to go.

Road under construction
Sky Restaurant. The highest restaurant in Africa, that's what they say! No cold drinks, it's freezing out there, you'll like their tea though.

Along the way...
It's along the way, experience the fresh air of the Maluti.

Gravel road
You wouldn't want to keep your windows opened! There's some distance you'll be travelling on gravel.

Cross the Mapholaneng river
We're here now, and the journey is almost coming to an end. In fact, we're done! The next location  
is the Mokhotlong town, which is not far from here.

Bonus!


I ventured on this journey as a mission trip, and it's amazing how most of claim to have gone around our countries but actually never enjoyed the spirit of the journey. It's not about the destination, it's about your experience along the way!


Leave a comment!


Friday 22 March 2013

Entrepreneurship – Google it!




My assertion is that everybody is an entrepreneur whether they realise it or not. This lays in my view of what entrepreneurship is. Now, there are so many definitions and explanations that are assumed on the word entrepreneurship but loosely put, it’s a matter of recognising opportunities and building on them.


Like I already indicated, I believe everybody is an entrepreneur since everybody is eyeing an opportunity of some sort. There are four different kinds of entrepreneurs that I want to focus on, and I want you to classify yourself after going through this. A good friend of mine was the one who helped me make finer distinctions between these entrepreneurs.



Survival Entrepreneurs

"...they merely do it for survival.."

Here we categorise people whose lives are of some sub-standard level. Any income they get is used to buy a meal for the day or meet the needs of the family. Believe me, there are also so many people who make a lot of cash but can still be viewed as survival entrepreneurs because the money they are making always has to pay some bills. No savings can be made from that money. Another good example can be that of the street vendors. For some of them, their survival is upon the little money they make.


 Lifestyle Entrepreneurs

Out of a 100 people, 80 fall under this category- my assumption. Individuals under this category have a very fascinating life. For them, it’s all about being ’up-to-date’. The money they make is for buying fast cars, penthouses, expensive gadgets and yes, fancy clothes. Now, don’t get me wrong, there’s nothing off beam with them purchasing whatever they want but these individuals are more focused on improving their conditions than themselves.



 Growing Entrepreneurs

Now, this is growth!
Many can claim they fall under this category but it’s actually a few who in truth do. Growing entrepreneurs are those individuals who are keen to see things advance and never want to be left out. Some studies show that in the future workers will run their own businesses rather than work for others. These workers will be constantly improving their job skills throughout their careers. And yes, these workers are growing entrepreneurs, seeking to improve themselves, their careers and their businesses.


Revolutionary Entrepreneurs


Much cannot be said about this category. You’ve had of the likes of Bill Gates, the late Steve Jobs, The Facebook Mark Zuckerberg, and …, complete the list with the one you endorse. The ideas that emanate from such individuals are worshipped. This however doesn’t mean that pioneering ideas are always from a certain group of individuals; everybody can reach this platform too.


Now, which kind of an entrepreneur are you?  


Leave a comment!

Friday 15 March 2013

Creating a Login Page using HTML, PHP, and MySQL

In creating a simple login page we’ll use HTML and the PHP programming language to connect to the MySQL server. What we’re about to do is almost covering the forms and interactive web pages’ built in functions. These technologies used are known as content management system are helpful in interactive web pages.

A few things before we go further:
You’ll need to have XAMPP Control Panel installed and Apache running on port 80 if you’re using Windows. MySQL server should also be running. If you’re using Skype, I recommend you halt its usage while working on this since its using the same port as Apache.

HTML code for the login page

login.html
<html>
<head>
</head>
<form name="login" method="post" action="connect.php">

Username: <input type="text" name="username" /><br />
Password: <input type="password" name="password" />
<input type="submit" value="Login">

</form>
</html>

Just copy and paste this block of code on your notepad, save in html format and run it. I recommend you use the same file names as I did; the same goes for the PHP coding.


PHP Coding to connect the MySQL server

connect.php
<?php
$connect=mysql_connect("localhost","root","password");

mysql_select_db("database_name",$connect) or
die (mysql_error().":<b> ".mysql_error()."</b>");

       $username = $_POST['username'];
       $password = $_POST['password'];
                   $username = mysql_real_escape_string($username);
                   $password = mysql_real_escape_string($password);
          
                   $sql = "SELECT * FROM table_name WHERE username='$username' and password='$password'";
       $result = mysql_query($sql);

                   $count = mysql_num_rows($result);
                   if($count == 1)
                   {
                                print"<script language='javascript'>alert('Welcome!');</script>";
        require('nextpage.html');
                                }
                                else
                                {
                                print"<script language='javascript'>alert('Username or Password Incorrect!');</script>";
                               
                                require('login.html');
                               
                                die (mysql_error().":<b> ".mysql_error()."</b>");
                                }
?>


  A few tweaks to work on:
You should create a database and have its name replace wherever the code says ‘database_name’ and also create a table in the database to replace ‘table_name’ on the code. The column names used should be the same as the ones used on the code.

The ‘$_POST’ variable names are the names given to the variables on the login page.
There’s however a pitfall on the code, there’s no ‘nextpage.html’ created to display whenever the user logs in, so you will have to create a page that will display and replace ‘nextpage.hmtl’.
I’ve also incorporated the use of JavaScript to alert whenever the login details are correct or otherwise.


Warning!
I’ve seen a lot of people struggle with launching the form pages on the XAMPP to run them on their localhost. All the pages you’re working on should be saved in the xampp sub-folder called htdocs that is located on most computers in drive C. So, for the login page above just have: localhost/login.html as your address. 


Your browser should display a webpage similar to this one.

Just comment for any queries or anything. Have fun coding!