Hey, another blog by me. Yeah, I usually don't so intros and stuff, but… yeah… I'll just…
Gah. If there is one function I hate in PHP, it's foreach. It took me AGES (about an hour… 'spose) to work it out. But at least I can do more things to arrays now… which is cool. I made a small md5'er (like… REALLY small. I'll post the code at the end of this blog just to show you how simple it was) just to pass the time.The eCommerce thing is coming along fine… but I still think I'll need a book.Argh, so much homework! I want this term to END. Right now. I'll have to study nearing the end though, exams coming up soon.Uhhmm… I'm still trying to think of more blog-ish material… I know! A poll… to end all polls!POLL #1Favourite style of music?1. Rock. Obviously the best choice.2. Rap and hip-hop, yo'.3. R&B4. Dance5. Electronica6. JazzPOLL #2DO YOU LIKE CHEESE?1. Hell yes!2. Of course I do!3. Yeah. I like cheese.4. Cheese FTW! 100% all the way!5. Cheese is my LIFE.6. I MAKE CHEESE!POLL #3Ruler of the universe?1. Zaphod Beeblebrox2. Firebird3. A paperclip!4. That guy over there, see the one with the cloak on…?5. My CAT.6. George BushPOLL #4Best poll?1. One poll to rule them all,2. One poll to find them.3. One poll to bring them all,4. And in the pollness bind them.5. That one.6. My CAT.<?php
function echo_form()
{
echo("<form action='".$_SERVER['PHP_SELF']."' method='POST'>
<p>Please input password to be MD5'd: <input type='text' name='passwd'><br />
<input type='submit' name='submit' value='MD5'></p></form>");
}
if (!(isset($_POST['submit']))) {
echo_form();
} else {
$passwd = md5($_POST['passwd']);
echo("MD5'd password: $passwd");
echo_form();
}
?>
POLL #1
Favourite style of music?1. Rock. Obviously the best choice.POLL #2DO YOU LIKE CHEESE?1. Hell yes!POLL #3Ruler of the universe?1. Zaphod BeeblebroxPOLL #4Best poll?.6. My CAT.#1-2
#2-3#3-2#4-1