Monday, July 14, 2008
KEN MOK
Tumelo Mokitimi from Riverside Abia 910 Maseru! born in Maf~town ls and left for Msu at the age of five. attended high school @ Lesotho High School where he joined armani ville! lighter in complexion. he is tall but not that tall! he was well known as T~MOK~NP, and later became MOK and after the introduction of Armaniville he became King MOK and later ken mok Armani! Chicks call him kiddy!
ken mok is now in the National University of Lesotho doing his first year of Bachelor of Science and Technology (BSc). MOK is the one who created this website with the help of Rapman~Armani(CIO & Director) and PRItea~Armani. In the campus, he is well known of his movement and what I dont know is, "what is wrong with his movement!" maybe if you check PESP 2008 you can get details on his movement!
ken mok is brother of Mokinson (13) and Liteboho (1)!
Subscribe to:
Post Comments (Atom)
/*
PHP Guestbook 1.1
Written by Tony Awtrey
Anthony Awtrey Consulting
See http://www.awtrey.com/support/dbeweb/ for more information
1.1 - Oct. 20, 1999 - changed the SQL statement that reads data
back out of the database to reverse the order putting the
newest entries at the top and limiting the total displayed
by default to 20. Added the ability to get the complete list
by appending the URL with '?complete=1'. Added the code and
additional query to count and list the total number of entries
and included a link to the complete list.
1.0 - Initial release
This is the SQL statement to create the database required for
this application.
CREATE TABLE guests (
guest_id
int(4)
unsigned
zerofill
DEFAULT '0000'
NOT NULL
auto_increment,
guest_name varchar(50),
guest_email varchar(50),
guest_time timestamp(14),
guest_message text,
PRIMARY KEY (guest_id)
);
*/
////////////////////////////////
// This checks to see if we need to add another guestbook entry.
////////////////////////////////
if (($REQUEST_METHOD=='POST')) {
////////////////////////////////
// This loop removed "dangerous" characters from the posted data
// and puts backslashes in front of characters that might cause
// problems in the database.
////////////////////////////////
for(reset($HTTP_POST_VARS);
$key=key($HTTP_POST_VARS);
next($HTTP_POST_VARS)) {
$this = addslashes($HTTP_POST_VARS[$key]);
$this = strtr($this, ">", " ");
$this = strtr($this, "<", " ");
$this = strtr($this, "|", " ");
$$key = $this;
}
////////////////////////////////
// This will catch if someone is trying to submit a blank
// or incomplete form.
////////////////////////////////
if ($name && $email && $message ) {
////////////////////////////////
// This is the meat of the query that updates the guests table
////////////////////////////////
$query = "INSERT INTO guests ";
$query .= "(guest_id, guest_name, ";
$query .= "guest_email, guest_time, guest_message) ";
$query .= "values(0000,'$name','$email',NULL,'$message')";
mysql_pconnect("host","user","password")
or die("Unable to connect to SQL server");
mysql_select_db("dbasename") or die("Unable to select database");
mysql_query($query) or die("Insert Failed!");
} else {
////////////////////////////////
// If they didn't include all the required fields set a variable
// and keep going.
////////////////////////////////
$notall = 1;
}
}
?>
Add a Message
//////////////////////////////// // This is where we connect to the database for reading. //////////////////////////////// mysql_pconnect("host","user","password") or die("Unable to connect to SQL server"); mysql_select_db("dbasename") or die("Unable to select database"); //////////////////////////////// // This is where we count the number of entries. //////////////////////////////// $query = "SELECT COUNT(*) FROM guests"; $numguests = mysql_query($query) or die("Select Failed!"); $numguest = mysql_fetch_array($numguests); ?>
} ?>
Add A Message
if ($notall == 1) { ?>Please answer all fields
} ?>//////////////////////////////// // This is where we connect to the database for reading. //////////////////////////////// mysql_pconnect("host","user","password") or die("Unable to connect to SQL server"); mysql_select_db("dbasename") or die("Unable to select database"); //////////////////////////////// // This is where we count the number of entries. //////////////////////////////// $query = "SELECT COUNT(*) FROM guests"; $numguests = mysql_query($query) or die("Select Failed!"); $numguest = mysql_fetch_array($numguests); ?>
echo $numguest[0]; ?> people have left me a message.
//////////////////////////////// // This is where we decide to get all the entries or just the last 20. // This variable is set by just adding a '?complete=1' after the URL. //////////////////////////////// if ($complete == 1) { $query = "SELECT * FROM guests ORDER BY guest_time DESC"; } else { $query = "SELECT * FROM guests ORDER BY guest_time DESC LIMIT 20"; } $guests = mysql_query($query) or die("Select Failed!"); //////////////////////////////// // This will loop as long as there are records waiting to be processed. // Notice the plain HTML inside the while loop structure. PHP is flexable // enough to allow you to break into and out of the "code" at any point. //////////////////////////////// while ($guest = mysql_fetch_array($guests)) { ?>Name: echo $guest['guest_name']; ?> | Email: echo $guest['guest_email']; ?> | //////////////////////////////// // The database has a timestamp record type that we can use to show the // date the guestbook was filled out. //////////////////////////////// $datefromdb = $guest['guest_time']; $year = substr($datefromdb,0,4); $mon = substr($datefromdb,4,2); $day = substr($datefromdb,6,2); $hour = substr($datefromdb,8,2); $min = substr($datefromdb,10,2); $sec = substr($datefromdb,12,2); $orgdate = date("l F dS, Y h:i A",mktime($hour,$min,$sec,$mon,$day,$year)); ?> Date: echo $orgdate; ?> |
echo $guest['guest_message']; ?> |
} ?>
I know you ken mok! we have met but I dont think u stil remember me! Limpho
ReplyDelete