Sakib on PHP

Text [PHP, HTML and State]

Posted in EasyPHP by Sakib on PHP on April 30th, 2008
1st step:

<html>
<head> <title> </title> </head>
<body>
<form method="GET" action="text.php">
Who is your favorite author?
<input name="Author" typ="text"/>
<br />
<br />
<input type="submit" value="submit"/>
</form>
</body>
</html>

2nd Step


<html>
<head><title></title></head>
<body>
Your favorite author is:
< ?php
echo $_GET['Author'];
?>
</body>
</html>
Tagged with: , , ,

Simple JavaScript Has Great Power : RSS Feed

Posted in EasyPHP by Sakib on PHP on April 28th, 2008

Copy and Paste on your site. This will show the most recent activities of any websites. enjoy


<script language=”JavaScript” src=”http://itde.vccs.edu/rss2js/feed2js.php?src=http%3A%2F%2Fsakib.wordpress.com%2Ffeed&chan=n&num=50&desc=0&date=y&targ=y” type=”text/javascript”></script>

<noscript>
<a href=”http://itde.vccs.edu/rss2js/feed2js.php?src=http%3A%2F%2Fsakib.wordpress.com%2Ffeed&chan=n&num=50&desc=0&date=y&targ=y&html=y”>View RSS feed</a>
</noscript>
Tagged with: , ,

Simple Code Makes Me Tired

Posted in EasyPHP by Sakib on PHP on April 6th, 2008
<p id=”header”>&nbsp;</p>

I recently learn a silly things and which makes me tired. Okay, I found on my sites middle a black images break down my site. I didn’t able to get the right way to remove. After that I am staring my codes, css, and so on. But, On a post accidentally I created this code and thus it happens…

Tagged with: , , ,

Javascript For Word Counting…

Posted in EasyPHP by Sakib on PHP on March 10th, 2008

Today I am looking for a counter and which will help me to count the words or letters. I got one also. I didn’t think about it but nowadays it’s necessary for me. And it’s tough to guess the worlds too. So.. Specially thanks this JavaScript

Below sharing with you the Word Counter Java Script:


< !– TWO STEPS TO INSTALL WORD COUNT:

1.  Copy the coding into the HEAD of your HTML document
2.  Add the last code into the BODY of your HTML document  –>

< !– STEP ONE: Paste this code into the HEAD of your HTML document  –>

<head>

<script LANGUAGE=”JavaScript”>
< !– Original:  Shawn Seley –>

< !– This script and many more are available free online at –>
< !– The JavaScript Source!! http://javascript.internet.com –>

< !– Begin
function CountWords (this_field, show_word_count, show_char_count) {
if (show_word_count == null) {
show_word_count = true;
}
if (show_char_count == null) {
show_char_count = false;
}
var char_count = this_field.value.length;
var fullStr = this_field.value + ” “;
var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, “”);
var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, ” “);
var splitString = cleanedStr.split(” “);
var word_count = splitString.length -1;
if (fullStr.length &lt;2) {
word_count = 0;
}
if (word_count == 1) {
wordOrWords = ” word”;
}
else {
wordOrWords = ” words”;
}
if (char_count == 1) {
charOrChars = ” character”;
} else {
charOrChars = ” characters”;
}
if (show_word_count & show_char_count) {
alert (”Word Count:\n” + “    ” + word_count + wordOrWords + “\n” + “    ” + char_count + charOrChars);
}
else {
if (show_word_count) {
alert (”Word Count:  ” + word_count + wordOrWords);
}
else {
if (show_char_count) {
alert (”Character Count:  ” + char_count + charOrChars);
}
}
}
return word_count;
}
//  End –>
</script>

</head>

< !– STEP TWO: Copy this code into the BODY of your HTML document  –>

<body>

<form>
<textarea cols=40 rows=5 name=x>
</textarea>
<br />
<input type=button value=”Count Words” OnClick =”CountWords(this.form.x, true, true);”/>
</form>

<p><center>
<font face=”arial, helvetica” size”-2″>Free JavaScripts provided<br />
by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
</center></p><p>

< !– Script Size:  2.04 KB –>

Recommended Word Counter: >> Thanks to www.javascriptkit.com/


<form method=”POST” name=”wordcount”>
<script language=”JavaScript”>

function countit(){

/*Word count script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(” “)
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td width=”100%”><textarea rows=”12″ name=”wordcount2″ cols=”60″ wrap=”virtual”></textarea></td>
</tr>
<tr>
<td width=”100%”><div align=”right”><p><input type=”button” value=”Calculate Words”
onClick=”countit()”/> <input type=”text” name=”wordcount3″ size=”20″/></p>
<div align=”center”><center><p><font face=”arial” size=”-2″>This free script provided by</font>
<font face=”arial, helvetica” size=”-2″><a href=”http://javascriptkit.com”>JavaScript
Kit</a></font></p>
</center></div></div></td>
</tr>
</table>
</form>

Animal Nation Episode - A Flight On Open Sky

Posted in Uncategorized by Sakib on PHP on February 14th, 2008

Have you ever fly on the sky? Have you ever enjoy your friendship. If not, you can enjoy this Animal Nation Episode and indeed you will get some entertainment.