<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>java-scripts &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/java-scripts/</link>
	<description>Feed of posts on WordPress.com tagged "java-scripts"</description>
	<pubDate>Mon, 28 Dec 2009 11:26:30 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Loving this HTML5 Canvas Experiment]]></title>
<link>http://catchexceptions.wordpress.com/2009/12/10/html5-canvas-experiment/</link>
<pubDate>Thu, 10 Dec 2009 08:23:33 +0000</pubDate>
<dc:creator>Sidharth k Dhanda</dc:creator>
<guid>http://catchexceptions.wordpress.com/2009/12/10/html5-canvas-experiment/</guid>
<description><![CDATA[﻿ HTML5 Canvas Experiment Stumbled upon this awesome HTML5 Experiment, built on an opensource proces]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>﻿</p>
<div id="attachment_38" class="wp-caption alignleft" style="width: 310px"><a href="http://9elements.com/io/?p=153" target="_blank"><img class="size-medium wp-image-38  " title="HTML5 Canvas Experiment" src="http://catchexceptions.wordpress.com/files/2009/12/html5-canvas-particles2.png?w=300" alt="HTML5 Canvas Experiment" width="300" height="109" /></a><p class="wp-caption-text">HTML5 Canvas Experiment</p></div>
<p>Stumbled upon this <a href="http://9elements.com/io/projects/html5/canvas/" target="_blank">awesome HTML5 Experiment</a>, built on an opensource <a href="http://processingjs.org/" target="_blank">processing.js</a>.</p>
<p>p.s .. keep your speakers on .. I loved the music.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Bad Word Detector/Spam Mail filer with PHP Contact Form]]></title>
<link>http://mehedi895.wordpress.com/2009/11/13/bad-word-detectorspam-mail-filer-with-php-contact-form/</link>
<pubDate>Fri, 13 Nov 2009 01:38:24 +0000</pubDate>
<dc:creator>mehedi895</dc:creator>
<guid>http://mehedi895.wordpress.com/2009/11/13/bad-word-detectorspam-mail-filer-with-php-contact-form/</guid>
<description><![CDATA[Normally most of the website likes to have contact form on it. So that the visitor can send emails t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Normally most of the website likes to have contact form on it. So that the visitor can send emails to page admin using that form. But some time, they receive lost of spam mail though the contact form. So, to detect this  spam and filer bad words, there is a very simple solution.</p>
<p> First, we will create a very simple form.  Save the form as contact-form.html. In this form we have 3 fields.  First two fields are normal text fields for name and email. The 3rd one is for message. We will filer and check for this filed only. Now add an action to this form, so that when the user will press submit button it will submit the form to contact-form.php file.</p>
<pre class="brush: xml;">
  &#60;form action=&#34;contact_form.php&#34; method=&#34;post&#34; name=&#34;fomrq&#34;&#62;
&#60;input name=&#34;firstname&#34; type=&#34;text&#34;  id=&#34;firstname&#34; size=&#34;40&#34; /&#62;
&#60;input name=&#34;email&#34; type=&#34;text&#34;  id=&#34;email&#34; size=&#34;40&#34;/&#62;
&#60;textarea name=&#34;message&#34; cols=&#34;89&#34; rows=&#34;5&#34; id=&#34;message&#34;&#62;textarea&#62;
  &#60;input name=&#34;button&#34; type=&#34;reset&#34; id=&#34;button&#34; value=&#34;Clear&#34; /&#62;
 &#60;input name=&#34;submit&#34; type=&#34;submit&#34;  id=&#34;submit&#34; value=&#34;Submit&#34; /&#62;
</pre>
<p>Now, in contact-form.php, file, we will receive all 3 variables as POST variable. Then we will call BadWords function. This BadWord function will read the csv file, and read all the listed bad words. Then It will compare it with all words of our message one by one.</p>
<pre class="brush: php;">
&#60;?php

	function BadWords($str)
 	{
	$str=strtolower($str);
	$cleanstr = $str;
	$charlist = array(&#34;&#124;3&#34;=&#62;&#34;b&#34;,&#34;13&#34;=&#62;&#34;b&#34;,&#34;l3&#34;=&#62;&#34;b&#34;,&#34;&#124;)&#34;=&#62;&#34;d&#34;,&#34;1)&#34;=&#62;&#34;d&#34;,&#34;[)&#34;=&#62;&#34;d&#34;,&#34;&#124;(&#34;=&#62;&#34;k&#34;,&#34;1(&#34;=&#62;&#34;k&#34;,&#34;$&#34;=&#62;&#34;s&#34;,&#34;(&#34;=&#62;&#34;c&#34;,&#34;1&#34;=&#62;&#34;i&#34;,&#34;+&#34;=&#62;&#34;t&#34;,&#34;&#124;&#34;=&#62;&#34;i&#34;,&#34;!&#34;=&#62;&#34;i&#34;,&#34;#&#34;=&#62;&#34;h&#34;,&#34;&#60;&#34;=&#62;&#34;c&#34;,&#34;@&#34;=&#62;&#34;a&#34;,&#34;0&#34;=&#62;&#34;o&#34;,&#34;{&#34;=&#62;&#34;c&#34;,&#34;[&#34;=&#62;&#34;c&#34;);

	foreach($charlist as $char=&#62;$value)
	{
		$cleanstr = strtolower(str_replace ($char, $value, $cleanstr));
	}

	$file = fopen('demo.csv', 'r');

	while (($line = fgetcsv($file)) !== FALSE)
	 {

	  list($id[], $word[]) = $line;
	}
	fclose($file);

	$badarray = $word;

	foreach ($badarray as $naughty)
	{
 		if (preg_match(&#34;/$naughty/&#34;, $str) or preg_match(&#34;/$naughty/&#34;, $cleanstr))
		{
           return true;
       	}
 	}
 	return false;
} // end of bad word
if (isset($_POST['submit']))
	{
		$firstname = $_POST['firstname'];
		$useremail = $_POST['email'];
		$message = $_POST['message'];

if($message &#60;&#62; &#34;&#34;)
		{
			if (BadWords($message))
			{
				require_once(&#34;class.phpmailer.php&#34;);
				$body = “Name: =$firstname &#60;br&#62; Email:= $useremail &#60;br&#62; $message”;
				$mail = new PHPMailer();
				$mail-&#62;From = &#34;enquiry @Your Domain.com&#34;;
				$mail-&#62;FromName = &#34; Your Domain Enquiry&#34;;
				$mail-&#62;AddAddress(&#34;spam@ Your Domain.com&#34;);
				$mail-&#62;Subject = &#34;{S P A M} Message” ;
				$mail-&#62;IsHTML(false);
				$mail-&#62;MsgHTML($body);
				$mail-&#62;Send();
				header('Location: contact_msg.html');
}
else
{
require_once(&#34;class.phpmailer.php&#34;);
				$body = “Name: =$firstname &#60;br&#62; Email:= $useremail &#60;br&#62; $message”;
				$mail = new PHPMailer();
				$mail-&#62;From = &#34;enquiry @Your Domain.com&#34;;
				$mail-&#62;FromName = &#34; Your Domain Enquiry&#34;;
				$mail-&#62;AddAddress(&#34;info@ Your Domain.com&#34;);
				$mail-&#62;Subject = &#34; New Message” ;
				$mail-&#62;IsHTML(false);
				$mail-&#62;MsgHTML($body);
				$mail-&#62;Send();
				header('Location: contact_msg.html');

}
}
?&#62;
</pre>
<p>Here, you can see, we are reading bad words from the demo.csv file and checking it with every word from your message. If the message contains any bad word it will go to spam@YourDomain.com or else it will go to info@YourDomain.com.<br />
Now, an example of our csv file, in this file we will list all the bad words. </p>
<pre class="brush: xml;">
1	shit
2	fuck
3	bitch
4	blowjob
5	clit	
</pre>
<p>For this Email form, we need PHP 5.0 and above, and also need to download  class.phpmailer.php file. We can download this file from http://phpmailer.sourceforge.net  .  Quit easy, right ? </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to post source code on Word Press Blog?]]></title>
<link>http://mehedi895.wordpress.com/2009/11/10/how-to-post-source-code-on-word-press-blog/</link>
<pubDate>Tue, 10 Nov 2009 09:03:08 +0000</pubDate>
<dc:creator>mehedi895</dc:creator>
<guid>http://mehedi895.wordpress.com/2009/11/10/how-to-post-source-code-on-word-press-blog/</guid>
<description><![CDATA[Wrap your code in these tags: [ sourcecode language="css"]…[/sourcecode]. Do not copy and paste this]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Wrap your code in these tags: [  sourcecode language="css"]…[/sourcecode]. Do not copy and paste this code – write it out (You can replace the language with “css” with the language that you are writing in. Currently WP support syntax highlighting for the following language codes:<br />
<strong><br />
C++ — cpp, c, c++<br />
C# — c#, c-sharp, csharp<br />
CSS — css<br />
Delphi — delphi, pascal<br />
Java — java<br />
JavaScript — js, jscript, javascript<br />
PHP — php<br />
Python — py, python<br />
Ruby — rb, ruby, rails, ror<br />
SQL — sql<br />
VB — vb, vb.net<br />
XML/HTML — xml, html, xhtml, xslt<br />
</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Adding Auto suggestions to a PHP site like Google Search ]]></title>
<link>http://mehedi895.wordpress.com/2009/11/10/adding-auto-suggestions-to-a-php-site-like-google-search/</link>
<pubDate>Tue, 10 Nov 2009 08:39:27 +0000</pubDate>
<dc:creator>mehedi895</dc:creator>
<guid>http://mehedi895.wordpress.com/2009/11/10/adding-auto-suggestions-to-a-php-site-like-google-search/</guid>
<description><![CDATA[Adding auto suggestions to a PHP site like Google Search is not difficult (Search as you type). Inde]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Adding auto suggestions to a PHP site like Google Search is not difficult (Search as you type). Indeed, it’s so easy to do. Just need some more lines of easy PHP coding and some java scripts.</p>
<p>First create a file named search.php. We will use this file as our main file for this demo. In the header section of search.php file just add : </p>
<pre class="brush: php;">
&#60;link rel=&#34;stylesheet&#34; href=&#34;autocomplete.css&#34; type=&#34;text/css&#34; media=&#34;screen&#34;&#62;
&#60;script src=&#34;autocomplete.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34;&#62;
	$(function() {
		 setAutoComplete(&#34;searchField&#34;, &#34;results&#34;, &#34;autocomplete.php?part=&#34;);

	});
	&#60;/script&#62;
</pre>
<p>Now, for autocomplete.css file, just copy and pest the following code :</p>
<pre class="brush: css;">
#searchField {
	width: 200px;}

#results {
	border: 1px solid #BFBFBF;
	border-bottom: 0px;
	font-size: 12px;
	font-family: arial;
	padding: 0px;
	display: none;
}

#results div {
    border-bottom: 1px solid #BFBFBF;
    padding: 3px;
}

#results .selected {
	background-color: #666;
	color: #fff;
}

#results .unselected {
	background-color: #fff;
	color: #666;
}
</pre>
<p>Now, we need to do some Java Scripts code for autocomplete.js, Its also very simple. You can just copy and pest all this in autocomplete.js and upload then.</p>
<pre class="brush: jscript;">
// global variables
var acListTotal   =  0;
var acListCurrent = -1;
var acDelay		  = 500;
var acURL		  = null;
var acSearchId	  = null;
var acResultsId	  = null;
var acSearchField = null;
var acResultsDiv  = null;

function setAutoComplete(field_id, results_id, get_url)
{

	// initialize vars
	acSearchId  = &#34;#&#34; + field_id;
	acResultsId = &#34;#&#34; + results_id;
	acURL 		= get_url;

	// create the results div
	$(&#34;#auto&#34;).append('&#60;div id=&#34;' + results_id + '&#34;&#62;&#60;/div&#62;');

	// register mostly used vars
	acSearchField	= $(acSearchId);
	acResultsDiv	= $(acResultsId);

	// reposition div
	repositionResultsDiv();

	// on blur listener
	acSearchField.blur(function(){ setTimeout(&#34;clearAutoComplete()&#34;, 200) });

	// on key up listener
	acSearchField.keyup(function (e) {

		// get keyCode (window.event is for IE)
		var keyCode = e.keyCode &#124;&#124; window.event.keyCode;
		var lastVal = acSearchField.val();

		// check an treat up and down arrows
		if(updownArrow(keyCode)){
			return;
		}

		// check for an ENTER or ESC
		if(keyCode == 13 &#124;&#124; keyCode == 27){
			clearAutoComplete();
			return;
		}

		// if is text, call with delay
		setTimeout(function () {autoComplete(lastVal)}, acDelay);
	});
}

// treat the auto-complete action (delayed function)
function autoComplete(lastValue)
{
	// get the field value
	var part = acSearchField.val();

	// if it's empty clear the resuts box and return
	if(part == ''){
		clearAutoComplete();
		return;
	}

	// if it's equal the value from the time of the call, allow
	if(lastValue != part){
		return;
	}

	// get remote data as JSON
	$.getJSON(acURL + part, function(json){

		// get the total of results
		var ansLength = acListTotal = json.length;

		// if there are results populate the results div
		if(ansLength &#62; 0){

			var newData = '';

			// create a div for each result
			for(i=0; i &#60; ansLength; i++) {
				newData += '&#60;div class=&#34;unselected&#34;&#62;' + json[i] + '&#60;/div&#62;';
			}

			// update the results div
			acResultsDiv.html(newData);
			acResultsDiv.css(&#34;display&#34;,&#34;block&#34;);

			// for all divs in results
			var divs = $(acResultsId + &#34; &#62; div&#34;);

			// on mouse over clean previous selected and set a new one
			divs.mouseover( function() {
				divs.each(function(){ this.className = &#34;unselected&#34;; });
				this.className = &#34;selected&#34;;
			})

			// on click copy the result text to the search field and hide
			divs.click( function() {
				acSearchField.val(this.childNodes[0].nodeValue);
				clearAutoComplete();
			});

		} else {
			clearAutoComplete();
		}
	});
}

// clear auto complete box
function clearAutoComplete()
{
	acResultsDiv.html('');
	acResultsDiv.css(&#34;display&#34;,&#34;none&#34;);
}

// reposition the results div accordingly to the search field
function repositionResultsDiv()
{
	// get the field position
	var sf_pos    = acSearchField.offset();
	var sf_top    = sf_pos.top;
	var sf_left   = sf_pos.left;

	// get the field size
	var sf_height = acSearchField.height();
	var sf_width  = acSearchField.width();

	// apply the css styles - optimized for Firefox
	acResultsDiv.css(&#34;position&#34;,&#34;absolute&#34;);
	acResultsDiv.css(&#34;left&#34;, sf_left - 2);
	acResultsDiv.css(&#34;top&#34;, sf_top + sf_height + 5);
	acResultsDiv.css(&#34;width&#34;, sf_width - 2);
}

// treat up and down key strokes defining the next selected element
function updownArrow(keyCode) {
	if(keyCode == 40 &#124;&#124; keyCode == 38){

		if(keyCode == 38){ // keyUp
			if(acListCurrent == 0 &#124;&#124; acListCurrent == -1){
				acListCurrent = acListTotal-1;
			}else{
				acListCurrent--;
			}
		} else { // keyDown
			if(acListCurrent == acListTotal-1){
				acListCurrent = 0;
			}else {
				acListCurrent++;
			}
		}

		// loop through each result div applying the correct style
		acResultsDiv.children().each(function(i){
			if(i == acListCurrent){
				acSearchField.val(this.childNodes[0].nodeValue);
				this.className = &#34;selected&#34;;
			} else {
				this.className = &#34;unselected&#34;;
			}
		});

		return true;
	} else {
		// reset
		acListCurrent = -1;
		return false;
	}
}
</pre>
<p>Now, come to autocomplete.php page. Here you need to change database name, host and password. Then change the table name and filed name in the query.</p>
<pre class="brush: php;">
&#60;?php

$link = mysql_connect(&#34;localhost&#34;, &#34;ibeadmin_db&#34;, &#34;ibehost123db&#34;);
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
if (!mysql_select_db(&#34;ibeadmin_db&#34;)) {
   echo &#34;Unable to select mydbname: &#34; . mysql_error();
   exit;
}

// check the parameter
if(isset($_GET['part']) and $_GET['part'] != '')
{
	$result = mysql_query(&#34;SELECT * FROM  order WHERE inv LIKE '%&#34; . $_GET['part'] . &#34;%'&#34; );
	while ($row = mysql_fetch_assoc($result))
	 {
			$colors[]=$row['inv']; // filed name that you want to show 

	}
	mysql_free_result($result);
	mysql_close($link);

	// initialize the results array
	$results = array();

	// search colors
	foreach($colors as $color)
	{

			$results[] = $color;

	}

	// return the array as json with PHP 5.2
	echo json_encode($results);
}
</pre>
<p>Just remember, we are queering the database and putting all data in this array to show.</p>
<pre class="brush: php;">
$colors[]=$row['inv']; // filed name that you want to show
</pre>
<p>so you need to change the filed name (inv), with the name of the Database Row you want to show as auto suggestion.</p>
<p>Ok, Now, again get back to search.php file. Just add this code any where in your site, where you want to show your search box. </p>
<pre class="brush: php;">
&#60;span id=&#34;auto&#34;&#62;
	&#60;input id=&#34;searchField&#34; name=&#34;searchField&#34; type=&#34;text&#34;  /&#62;
&#60;/span&#62;
</pre>
<p>That&#8217;s all. happy programming.  </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Using a Multipart Jquary Form with PHP]]></title>
<link>http://mehedi895.wordpress.com/2009/10/26/hi/</link>
<pubDate>Mon, 26 Oct 2009 02:52:22 +0000</pubDate>
<dc:creator>mehedi895</dc:creator>
<guid>http://mehedi895.wordpress.com/2009/10/26/hi/</guid>
<description><![CDATA[Last week, I was working on a PHP Multi-Part from using Jquary, and I found some little difficulty. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Last week, I was working on a PHP Multi-Part from using Jquary, and I found some little difficulty. I have searched online for tutorials or sample code. But no such code is available online. So I have tried some raw code, on my example, I have used Jquary to hide and show some part of the form.<br />
Ok, now here is a simple form. The user will have option to, Select the type. And Jquary will automatically change the div. That means, if the user select “Type 1”, we want to show only DIV 1 , and so on. </p>
<pre class="brush: php;">
&#60;head&#62;
&#60;script src=&#34;jquery-1.3.2.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;form name=&#34;form&#34; id=&#34;form&#34; method=&#34;post&#34; action=&#34;new.php&#34;/&#62;
&#60;table width=&#34;100%&#34; border=&#34;0&#34; cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&#62;
&#60;tr&#62;&#60;td style=&#34;padding-left:10px;&#34;&#62;
&#60;select id=&#34;serviceSelect&#34; name=&#34;serviceSelect&#34; class=&#34;tableTxt&#34; &#62;
&#60;option  value=&#34;1&#34;  class=&#34;tableTxt&#34;&#62; Type 1  &#60;/option&#62;
&#60;option  value=&#34;2&#34;  class=&#34;tableTxt&#34;&#62; Type 2 &#60;/option&#62;
&#60;option  value=&#34;3&#34;  class=&#34;tableTxt&#34;&#62; Type 3 &#60;/option&#62;
  &#60;/select&#62;
&#60;/td&#62;&#60;/tr&#62;
&#60;tr&#62;&#60;td style=&#34;padding-left:10px;&#34;&#62;
&#60;div id=&#34;divarea1&#34; style=&#34;display:none&#34;&#62;
&#60;table width=&#34;100%&#34; border=&#34;0&#34; cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&#62;
&#60;tr&#62;&#60;td style=&#34;padding-left:10px;&#34;&#62;
&#60;input name=&#34;name1&#34;  type=&#34;text&#34; class=&#34;tableTxt&#34;  id=&#34;name1&#34; style=&#34;width:40px&#34; /&#62;
&#60;/td&#62;&#60;/tr&#62;
&#60;/table&#62;
&#60;/div&#62;
&#60;div id=&#34;divarea2&#34; style=&#34;display:none&#34;&#62;
&#60;table width=&#34;100%&#34; border=&#34;0&#34; cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&#62;
&#60;tr&#62;&#60;td style=&#34;padding-left:10px;&#34;&#62;
&#60;input name=&#34;name2&#34;  type=&#34;text&#34; class=&#34;tableTxt&#34; id=&#34;name2&#34; style=&#34;width:40px&#34; /&#62;
&#60;/td&#62;&#60;/tr&#62;
&#60;/table&#62;

&#60;/div&#62;
   &#60;div id=&#34;divarea3&#34; style=&#34;display:none&#34;&#62;
&#60;table width=&#34;100%&#34; border=&#34;0&#34; cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&#62;
&#60;tr&#62;&#60;td style=&#34;padding-left:10px;&#34;&#62;
&#60;input name=&#34;name3&#34;  type=&#34;text&#34; class=&#34;tableTxt&#34; id=&#34;name3&#34; style=&#34;width:40px&#34; /&#62;
&#60;/td&#62;&#60;/tr&#62;
&#60;/table&#62;
&#60;/div&#62;
&#60;/td&#62;&#60;/tr&#62;
&#60;tr&#62;&#60;td style=&#34;padding-left:10px;&#34;&#62;
&#60;input name=&#34;submit&#34; type=&#34;submit&#34; class=&#34;tableTxt&#34; id=&#34;submit&#34; value=&#34;  Submit  &#34; /&#62;
&#60;/td&#62;&#60;/tr&#62;
&#60;/table&#62;
&#60;script type=&#34;text/javascript&#34;&#62;

    var JQ = jQuery.noConflict(true);

	   JQ(document).ready(function()
	    {
		var currTitleDiv;

		function changeTitleDiv()
		   {
				var id = JQ('#serviceSelect').val();
				var div_id = '#divarea' + id;
				if (currTitleDiv != null) currTitleDiv.hide();
				currTitleDiv = JQ(div_id);
				currTitleDiv.show();
			}

		JQ('#serviceSelect').change(function() {
				changeTitleDiv();

			});

			changeTitleDiv();
			});
&#60;/script&#62;
</pre>
<p>That’s all. Now we will get name’s of the user as a post variable. It is only one line coding, </p>
<pre class="brush: php;">
&#60;?php
$name1 = $_POST['name1'];
$name2 = $_POST['name2'];
$name3 = $_POST['name3'];
?&#62;
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Simple Dynamic Content with PHP]]></title>
<link>http://mehedi895.wordpress.com/2009/08/24/simple-dynamic-content-with-php/</link>
<pubDate>Mon, 24 Aug 2009 01:50:47 +0000</pubDate>
<dc:creator>mehedi895</dc:creator>
<guid>http://mehedi895.wordpress.com/2009/08/24/simple-dynamic-content-with-php/</guid>
<description><![CDATA[We’re going to start out easy testing page to test a dynamic PHP page. At first enter the following ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>We’re going to start out easy testing page to test a dynamic PHP page. At first enter the following into your text editor and save it as main.php:</p>
<pre class="brush: xml;">
&#38;lt;Html&#38;gt;
&#38;lt;head&#38;gt;
&#38;lt;title&#38;gt;Simple PHP page&#38;lt;/title&#38;gt;
&#38;lt;/head&#38;gt;
&#38;lt;body&#38;gt;
&#38;lt;/body&#38;gt;
&#38;lt;/html&#38;gt;
</pre>
<p>Now, we will add a header, footer and a navigation panel. To include a basic header in our HTML document, we’ll add them in the main file to add dynamic Header, Footer and a navigation panel.<br />
Header :<br />
For header just white a php file with following code and Save it as header.php.</p>
<pre class="brush: php;">
&#38;lt;?php
&#38;lt;h1&#38;gt;PHP for Web designers&#38;lt;/h1&#38;gt;
?&#38;gt;
</pre>
<p>Notice the file has no defining, or elements, or any other code. This is because the HTML page into which the header file is embedded already has the necessary data for the server to display its contents, and is therefore not required inside the included file.</p>
<p>Footer:<br />
Next, type the following in a new file and save it as footer.php:</p>
<pre class="brush: php;">
&#38;lt;?php
© 2005 WordPress Blogs. All rights reserved.
?&#38;gt;
</pre>
<p>Navigation:</p>
<p>Just to finish things off, now create a new PHP file, then add the following link list and save it as navigation.php. We will call this navigation panel in our main.php page.</p>
<pre class="brush: php;">
&#38;lt;?php
&#38;lt;ul&#38;gt;
	&#38;lt;li&#38;gt;&#38;lt;a title=&#38;quot;Page intro&#38;quot; href=&#38;quot;main.php?id=intro&#38;quot;&#38;gt;Intro&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
	&#38;lt;li&#38;gt;&#38;lt;a title=&#38;quot;Blue Truck&#38;quot; href=&#38;quot;main.php?id=bluetruck&#38;quot;&#38;gt;Blue Truck&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
	&#38;lt;li&#38;gt;&#38;lt;a title=&#38;quot;Red House&#38;quot; href=&#38;quot;main.php?id=redhouse&#38;quot;&#38;gt;Red House&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
	&#38;lt;li&#38;gt;&#38;lt;a title=&#38;quot;Brown Bear&#38;quot; href=&#38;quot;main.php?id=brownbear&#38;quot;&#38;gt;Brown Bear&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
&#38;lt;/ul&#38;gt;
&#38;lt;?
 </pre>
<p>Our basic structure</p>
<p>At this point, we should have the following in our file main.php:</p>
<pre class="brush: xml;">
&#38;lt;Html&#38;gt;
&#38;lt;head&#38;gt;
&#38;lt;title&#38;gt;Simple PHP page&#38;lt;/title&#38;gt;
&#38;lt;/head&#38;gt;
&#38;lt;body&#38;gt;
&#38;lt;/body&#38;gt;
&#38;lt;/html&#38;gt;
</pre>
<p>In a moment, we’ll begin working on inserting some dynamic code based on the REQUEST a browser makes to our server. But first, a few things worth noting.</p>
<p>Include paths</p>
<p>You may notice that header.php, navigation.php and footer.php are included simply as include (&#8220;filename.php&#8221;);. This is fine if we are going to have all of our files, namely main.php, header.php and footer.php etc., in the same directory on the server. But this isn’t always the case. In some instances you may have your common elements like header.php and footer.php in one folder, and your template, main.php in another. To help keep your sanity when including files then, it’s a good idea to include them right from the file system root of your server.<br />
Let’s put this to practice. Create a new folder called Inc and move header.php, navigation.php and footer.php to that folder. Leave main.php outside of that folder. You should now edit main.php to look like this:</p>
<pre class="brush: php;">
&#38;lt;?php
?&#38;gt;
&#38;lt;Html&#38;gt;
&#38;lt;head&#38;gt;
&#38;lt;title&#38;gt;Simple PHP page&#38;lt;/title&#38;gt;
&#38;lt;/head&#38;gt;
&#38;lt;body&#38;gt;
&#38;lt;?php include (&#38;quot;inc/header.php&#38;quot;); ?&#38;gt;
&#38;lt;?php include (&#38;quot;inc/ navigation.php&#38;quot;); ?&#38;gt;
&#38;lt;?php include (&#38;quot;inc/footer.php &#38;quot;); ?&#38;gt;
&#38;lt;/body&#38;gt;
&#38;lt;/html&#38;gt;
</pre>
<p>That’s all, we are done. This is the simplest way to create a dynamic PHP page (equivalent to Master page in ASP.net). Now, if we can create hundreds of PHP pages with including this header/footer/navigation. It will make our life easier, while we will go for editing navigation or header/footer of the whole site later. Happy programming.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Web Development, Java Script, dot net, programming Help ]]></title>
<link>http://hunt99.wordpress.com/2009/08/14/web-development-java-script-dot-net-programming-help/</link>
<pubDate>Fri, 14 Aug 2009 05:06:21 +0000</pubDate>
<dc:creator>hunt99</dc:creator>
<guid>http://hunt99.wordpress.com/2009/08/14/web-development-java-script-dot-net-programming-help/</guid>
<description><![CDATA[Computer Science Homework help ! Started by cindy yen on   8/12/2009 6:36:47 PM Web development assi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><table id="dlAirList" style="width:100%;border-collapse:collapse;" border="0" cellspacing="0">
<tbody>
<tr style="border-bottom:1px groove slateblue;width:100%;">
<td style="border-right:1px groove slateblue;width:8%;" align="center" valign="middle"><img style="height:50px;width:50px;border-style:double;border-width:0;" src="http://www.transtutors.com/images/qimage1.JPG" alt="" /></td>
<td style="border-right:1px groove slateblue;width:45%;padding:5px 5px 5px 10px;" align="left" valign="middle"><a id="dlAirList_ctl09_lnksubcategory" style="color:#006699;font-size:10pt;font-weight:bold;" href="http://www.transtutors.com/forums/Computer-Science/0/592/Computer-Science-Homework-help-%21.htm">Computer Science Homework help !</a></p>
<p><span> Started by      <span id="dlAirList_ctl09_lblqfname" style="color:#006699;text-decoration:underline;">cindy</span> <span id="dlAirList_ctl09_lblqlname" style="color:#006699;text-decoration:underline;">yen</span> on   8/12/2009 6:36:47 PM</span></td>
</tr>
<tr>
<td></td>
</tr>
<tr style="border-bottom:1px groove slateblue;width:100%;">
<td style="border-right:1px groove slateblue;width:8%;" align="center" valign="middle"><img style="height:50px;width:50px;border-style:double;border-width:0;" src="http://www.transtutors.com/images/qimage1.JPG" alt="" /></td>
<td style="border-right:1px groove slateblue;width:45%;padding:5px 5px 5px 10px;" align="left" valign="middle"><a id="dlAirList_ctl10_lnksubcategory" style="color:#006699;font-size:10pt;font-weight:bold;" href="http://www.transtutors.com/forums/Computer-Science/0/591/Web-development-assignment-help.htm">Web development assignment help</a></p>
<p><span> Started by      <span id="dlAirList_ctl10_lblqfname" style="color:#006699;text-decoration:underline;">mark</span> <span id="dlAirList_ctl10_lblqlname" style="color:#006699;text-decoration:underline;">law</span> on   8/12/2009 6:30:40 PM</span></td>
</tr>
<tr>
<td></td>
</tr>
<tr style="border-bottom:1px groove slateblue;width:100%;">
<td style="border-right:1px groove slateblue;width:8%;" align="center" valign="middle"><img style="height:50px;width:50px;border-style:double;border-width:0;" src="http://www.transtutors.com/images/qimage1.JPG" alt="" /></td>
<td style="border-right:1px groove slateblue;width:45%;padding:5px 5px 5px 10px;" align="left" valign="middle"><a id="dlAirList_ctl11_lnksubcategory" style="color:#006699;font-size:10pt;font-weight:bold;" href="http://www.transtutors.com/forums/Computer-Science/0/590/Java-Script-Assignment-Help.htm">Java Script Assignment Help</a></p>
<p><span> Started by      <span id="dlAirList_ctl11_lblqfname" style="color:#006699;text-decoration:underline;">mark</span> <span id="dlAirList_ctl11_lblqlname" style="color:#006699;text-decoration:underline;">law</span> on   8/12/2009 6:26:48 PM</span></td>
</tr>
<tr>
<td></td>
</tr>
<tr style="border-bottom:1px groove slateblue;width:100%;">
<td style="border-right:1px groove slateblue;width:8%;" align="center" valign="middle"><img style="height:50px;width:50px;border-style:double;border-width:0;" src="http://www.transtutors.com/images/qimage1.JPG" alt="" /></td>
<td style="border-right:1px groove slateblue;width:45%;padding:5px 5px 5px 10px;" align="left" valign="middle"><a id="dlAirList_ctl12_lnksubcategory" style="color:#006699;font-size:10pt;font-weight:bold;" href="http://www.transtutors.com/forums/Computer-Science/0/589/Database-assignment-help.htm">Database assignment help</a></p>
<p><span> Started by      <span id="dlAirList_ctl12_lblqfname" style="color:#006699;text-decoration:underline;">anand</span> <span id="dlAirList_ctl12_lblqlname" style="color:#006699;text-decoration:underline;">vardhan</span> on   8/12/2009 6:17:37 PM</span></td>
</tr>
<tr>
<td></td>
</tr>
<tr style="border-bottom:1px groove slateblue;width:100%;">
<td style="border-right:1px groove slateblue;width:8%;" align="center" valign="middle"><img style="height:50px;width:50px;border-style:double;border-width:0;" src="http://www.transtutors.com/images/qimage1.JPG" alt="" /></td>
<td style="border-right:1px groove slateblue;width:45%;padding:5px 5px 5px 10px;" align="left" valign="middle"><a id="dlAirList_ctl13_lnksubcategory" style="color:#006699;font-size:10pt;font-weight:bold;" href="http://www.transtutors.com/forums/Computer-Science/0/588/Sql-Server-Homework-Help.htm">Sql Server Homework Help</a></p>
<p><span> Started by      <span id="dlAirList_ctl13_lblqfname" style="color:#006699;text-decoration:underline;">anand</span> <span id="dlAirList_ctl13_lblqlname" style="color:#006699;text-decoration:underline;">vardhan</span> on   8/12/2009 6:11:32 PM</span></td>
</tr>
<tr>
<td></td>
</tr>
<tr style="border-bottom:1px groove slateblue;width:100%;">
<td style="border-right:1px groove slateblue;width:8%;" align="center" valign="middle"><img style="height:50px;width:50px;border-style:double;border-width:0;" src="http://www.transtutors.com/images/qimage1.JPG" alt="" /></td>
<td style="border-right:1px groove slateblue;width:45%;padding:5px 5px 5px 10px;" align="left" valign="middle"><a id="dlAirList_ctl14_lnksubcategory" style="color:#006699;font-size:10pt;font-weight:bold;" href="http://www.transtutors.com/forums/Computer-Science/0/587/C++-Help.htm">C++ Help</a></p>
<p><span> Started by      <span id="dlAirList_ctl14_lblqfname" style="color:#006699;text-decoration:underline;">Zoey</span> <span id="dlAirList_ctl14_lblqlname" style="color:#006699;text-decoration:underline;">Seth</span> on   8/12/2009 10:59:16 AM</span></td>
</tr>
</tbody>
</table>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Web Developers (Ad is no longer available]]></title>
<link>http://careermonkey.wordpress.com/2009/06/29/web-developers-tobys-sports/</link>
<pubDate>Mon, 29 Jun 2009 02:42:42 +0000</pubDate>
<dc:creator>johnmanila</dc:creator>
<guid>http://careermonkey.wordpress.com/2009/06/29/web-developers-tobys-sports/</guid>
<description><![CDATA[Sorry this ad is no longer available To view more Web development/design job vacancies click here To]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Sorry this ad is no longer available<br />
To view more Web development/design job vacancies click <a href="http://www.jobsdb.com.ph/PH/EN/V6/JS/JobSearch/JobSearch.asp?PN=JobListing&#38;FullTextKeywords=Web%20design&#38;JobAreasU=&#38;SelectedLocations=&#38;AdsListDuration=&#38;KeywordSearchFields=Positions&#38;KeywordOption=ALL&#38;SrcTrack=HeaderSearchBox">here</a></p>
<p>Toby’s Sports, the leading sports retailer in the Philippines, known for its complete line of merchandise, quality service and innovative store design, is looking for a WEB DEVELOPER.</p>
<p>Qualifications:<br />
- Male, between 24-28 yrs old<br />
- Graduate of Computer Science, Information Technology or other IT related courses<br />
- Skilled in Web Dynamic Development and Programming<br />
- Skilled in HTML, PHP, JAVA SCRIPTS, CSS<br />
- At least two years experience in web development using LAMP<br />
- Has background in web security and e-commerce<br />
- Performs site maintenance, updates and uploading of content<br />
- Creates, edits images for website use<br />
- Good analysis and problem solving skills</p>
<p>Interested applicants may apply <a href="http://www.jobsdb.com.ph/PH/EN/Job.asp?R=JDBP102907299">here</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[10 Simple but Useful PHP Tricks (part-1)]]></title>
<link>http://mehedi895.wordpress.com/2009/05/06/10-simple-but-useful-php-tricks-part-1/</link>
<pubDate>Wed, 06 May 2009 03:18:54 +0000</pubDate>
<dc:creator>mehedi895</dc:creator>
<guid>http://mehedi895.wordpress.com/2009/05/06/10-simple-but-useful-php-tricks-part-1/</guid>
<description><![CDATA[1. Live Clock in php: It’s always very exciting to set up a simple and live clock in a website. We c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>1.	Live Clock in php: It’s always very exciting to set up a simple and live clock in a website. We can add a java script based cock in any PHP website. Here is an example. For sample code simply run clock.php on your local host or server. If you need to adjust time (to your local time) then hrStr = today.getHours() + 2; 	minVal = today.getMinutes() + 15; change this two variable (marked in red ) and run the file again. That’s all …<br />
<img src="http://mehedi895.wordpress.com/files/2009/05/clock.jpg?w=150" alt="clock" title="clock" width="150" height="104" class="aligncenter size-thumbnail wp-image-49" /></p>
<p>2.	Monthly Calendar: Hum, you may thing, that I am not happy with a clock only I need a Calendar. Okays do worry, adding a calendar is also very easy. You need to just call our calendar class (calenderclass.php) to print it to your website. To change colors and fonts feel free to change CSS coding in class file. For sample you can try our clander.php file. Now you should say, adding a calendar is so simple.<br />
<img src="http://mehedi895.wordpress.com/files/2009/05/calender.jpg?w=150" alt="calender" title="calender" width="150" height="125" class="aligncenter size-thumbnail wp-image-48" /></p>
<p>3.	PHP Mailer: Sending a confirmation mail is little bit tricky in PHP. But don’t worry, we have a simple solution. Try my sample (mail.php), yes its only 10 lines of code, using the PHP mailer class. You don’t need bother about the PHP mailer class, just put (class.phpmailer.php) it on your local server and can try it easily. For email address you can just changes the variables in mail.php file. In my sample, I am sending a confirmation mail to the e-mail address user will provide. <img src="http://mehedi895.wordpress.com/files/2009/05/mail.jpg?w=150" alt="mail" title="mail" width="150" height="117" class="aligncenter size-thumbnail wp-image-47" /></p>
<p>4.	In word: It’s a very funny function, but very useful. When you will print an official receipt or pay slip automatically, you may want to print the total amount in word (that’s the standard procedure in real life). So, you will say it will very difficult to print a variable in word. Not at all, you can just do it in a minute. All you need to just put the Numbers folder in your server and try inword.php file. One more thing, you should have a PEAR supported server to use this function.  <img src="http://mehedi895.wordpress.com/files/2009/05/inword.jpg?w=150" alt="inword" title="inword" width="150" height="120" class="aligncenter size-thumbnail wp-image-46" /></p>
<p>5.	Chat Client:  Yes, chat client is a very exciting feature of a website. Yes, again we have a very simple solution for you, just upload w.php, chat.txt, chat.php and jquery.js on your server and run chat.php. That’s all, for customization, you can open chat.php file and edit the CSS part.<br />
<img src="http://mehedi895.wordpress.com/files/2009/05/chat.jpg?w=150" alt="chat" title="chat" width="150" height="144" class="aligncenter size-thumbnail wp-image-45" /></p>
<p>Note : I have user most of the class file from php.net and PEAR website, for some code I took help from some tutorials and websites available online for free. </p>
<p><strong>TO download sample file : http://host.hackerbox.org/download.php?file=4a311bc4e7e41fa2f1f9e70eb81fb780</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[10 Simple but Useful PHP Tricks (Part 2)]]></title>
<link>http://mehedi895.wordpress.com/2009/05/06/10-simple-but-useful-php-tricks-part-2/</link>
<pubDate>Wed, 06 May 2009 01:33:12 +0000</pubDate>
<dc:creator>mehedi895</dc:creator>
<guid>http://mehedi895.wordpress.com/2009/05/06/10-simple-but-useful-php-tricks-part-2/</guid>
<description><![CDATA[6. Ajax Pagination: Pagination is an important feature for commercial websites. Usually it makes the]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>6.	Ajax Pagination: Pagination is an important feature for commercial websites. Usually it makes the site more professional and gives a wide room to handle more contents. In my sample, I used JAVA scripts to handle pagination function. It is very easy to use, and this Ajax enable code can restore other pages without refreshing the browser.<br />
<img src="http://mehedi895.wordpress.com/files/2009/05/page.jpg?w=150" alt="page" title="page" width="150" height="71" class="aligncenter size-thumbnail wp-image-56" /><br />
7.	Ajax enables Login: To use my sample just use the conn.php page to database configuration. Then you can start using index.php page for login and the secure.php is a demo landing page. You can change it as you wish.<br />
<img src="http://mehedi895.wordpress.com/files/2009/05/login.jpg?w=150" alt="login" title="login" width="150" height="95" class="aligncenter size-thumbnail wp-image-57" /></p>
<p>8.	Menu: Hum, you may always think to add a cool looking drop down menu to you website. So, again java scripts come in to help us in this situation. You can simply edit the javascript codes (submenu variable) in index.php file to customize it.<br />
<img src="http://mehedi895.wordpress.com/files/2009/05/menu.jpg?w=150" alt="menu" title="menu" width="150" height="125" class="aligncenter size-thumbnail wp-image-58" /></p>
<p>9.	Google Map: Using Google map API is a new fashion in web technology. Now-a-days, almost every website is using this. In my demo I have done this in a more fancy way. You can search a location and see the static map (you can also print). And for a specific location you will see some pointer. If you click a pointer it will show the identity of the place. All these done using Google MAP API with Java scripts (very simple) and for locations I used a XML file to store location, Lang-Lat, and Image location.<br />
<img src="http://mehedi895.wordpress.com/files/2009/05/google.jpg?w=150" alt="google" title="google" width="150" height="97" class="aligncenter size-thumbnail wp-image-59" /></p>
<p>10.	Page validation: Last but not least, Page validation is very important feature in web tech. unfortunately PHP do not support client site validation. Here I have used both client side (javascript) and sever site (PHP) validation. For customization you can change CSS (general.css) file. All java scripts codes are in Validation.js file and PHP codes are in validation.php. So enjoy, Happy programming. </p>
<p><img src="http://mehedi895.wordpress.com/files/2009/05/untitled-1.jpg?w=150" alt="untitled-1" title="untitled-1" width="150" height="104" class="aligncenter size-thumbnail wp-image-60" /><br />
 Privacy Policy: All class file and resources used here, collected from php.net and other websites for only personal use. Sample codes can be downloaded from HackerBox.com.<br />
Download Link:  http://host.hackerbox.org/download.php?file=3abe1d06efc2cbc7d2f065ce6901dd9e. </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Keeping It Real]]></title>
<link>http://rickymajtyka.wordpress.com/2009/04/23/need-powerful-software-script-and-more/</link>
<pubDate>Thu, 23 Apr 2009 21:35:03 +0000</pubDate>
<dc:creator>rickymajtyka</dc:creator>
<guid>http://rickymajtyka.wordpress.com/2009/04/23/need-powerful-software-script-and-more/</guid>
<description><![CDATA[The Fortune 39 This web site is designed with the Internet Marketer in mind. If you are looking for ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The Fortune 39
<p>
This web site is designed with the Internet Marketer in mind. If you are looking for software to promote your existing on line business this $39 purchase will send you in the right direction. Not only can you use all of the software. You can resell them and make yourself a little money or a substantial amount of money. It all depends on what motivates you.
<p>
There are no monthly fees to be concerned about. You will receive all future upgrades for free. This is a scam free site. 11,000 members have joined this program. There are clients that are very good at getting sales through the use of the internet. We have records of clients sending out a 1,000 emails and making 100 sales per 1,000. When you become a reseller of this huge collection of digital downloads. You can make $24 per sale 100x$24=$2,400. The administrator collects $15 per sale. The administrator will put together a site just like the one you purchased from. You do nothing but sell the site the administrator will take care of the introduction and setting up of the site you just sold. Now add in the sales you will make by reselling these products. It will add up fast.
<p>
Just to give you an idea of how powerful this purchase is. Listen and read the testimonials. <a href="http://www.youscoundrelyou.com/ysy/memberscomments.htm" target="_blank">Click Here</a></p>
<p><a href="http://www.12path.com/TheFortune39.html">Click here to make your $39 purchase today.</a></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
