<?xml version="1.0" encoding="ISO-8859-1"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en-US">
	<title>dpwebservices.net Web Development Blog</title>
	<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php" />
	<modified>2010-07-30T06:45:12Z</modified>
	<author>
		<name>Preiss</name>
	</author>
	<copyright>Copyright 2010, Preiss</copyright>
	<generator url="http://www.sourceforge.net/projects/sphpblog" version="0.5.1">SPHPBLOG</generator>
	<entry>
		<title>Clean our odd characters pasted from word to form fields (javascript version)</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry090121-153126" />
		<content type="text/html" mode="escaped"><![CDATA[Here is the javascript version to clean out odd characters pasted from word into form fields:<br /><br />function html_fix(html) {	<br /><br />	html = html.replace(/&lt;\\?\?xml[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/&lt;\/?o:p[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/&lt;\/?v:[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/&lt;\/?o:[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/&lt;\/?st1:[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/ /ig,&quot;&quot;);<br />	html = html.replace(/&lt;\/?SPAN[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/&lt;\/?FONT[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/&lt;BR[^&gt;]*&gt;/ig,&quot;&lt;BR /&gt;&quot;);		<br />	html = html.replace(/&lt;P[^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/&lt;\/P[^&gt;]*&gt;/ig,&quot;&lt;BR /&gt;&quot;);<br />	html = html.replace(/&lt;![^&gt;]*&gt;/ig,&quot;&quot;);<br />	html = html.replace(/¡/g,&quot;¡&quot;);<br />	html = html.replace(/¤/g,&quot;¤&quot;);<br />	html = html.replace(/¢/g,&quot;¢&quot;);<br />	html = html.replace(/£/g,&quot;£&quot;);<br />	html = html.replace(/¥/g,&quot;¥&quot;);<br />	html = html.replace(/¦/g,&quot;¦&quot;);<br />	html = html.replace(/§/g,&quot;§&quot;);<br />	html = html.replace(/¨/g,&quot;¨&quot;);<br />	html = html.replace(/©/g,&quot;©&quot;);<br />	html = html.replace(/ª/g,&quot;ª&quot;);<br />	html = html.replace(/«/g,&quot;«&quot;);<br />	html = html.replace(/¬/g,&quot;¬&quot;);<br />	html = html.replace(/­/g,&quot;­&quot;);<br />	html = html.replace(/®/g,&quot;®&quot;);<br />	html = html.replace(/™/g,&quot;™&quot;);<br />	html = html.replace(/¯/g,&quot;¯&quot;);<br />	html = html.replace(/°/g,&quot;°&quot;);<br />	html = html.replace(/±/g,&quot;±&quot;);<br />	html = html.replace(/²/g,&quot;²&quot;);<br />	html = html.replace(/³/g,&quot;³&quot;);<br />	html = html.replace(/´/g,&quot;´&quot;);<br />	html = html.replace(/µ/g,&quot;µ&quot;);<br />	html = html.replace(/¶/g,&quot;¶&quot;);<br />	html = html.replace(/·/g,&quot;·&quot;);<br />	html = html.replace(/¸/g,&quot;¸&quot;);<br />	html = html.replace(/¹/g,&quot;¹&quot;);<br />	html = html.replace(/º/g,&quot;º&quot;);<br />	html = html.replace(/»/g,&quot;»&quot;);<br />	html = html.replace(/¼/g,&quot;¼&quot;);<br />	html = html.replace(/½/g,&quot;½&quot;);<br />	html = html.replace(/¾/g,&quot;¾&quot;);<br />	html = html.replace(/¿/g,&quot;¿&quot;);<br />	html = html.replace(/×/g,&quot;×&quot;);<br />	html = html.replace(/÷/g,&quot;÷&quot;);<br />	html = html.replace(/À/g,&quot;À&quot;);<br />	html = html.replace(/Á/g,&quot;Á&quot;);<br />	html = html.replace(/Â/g,&quot;Â&quot;);<br />	html = html.replace(/Ã/g,&quot;Ã&quot;);<br />	html = html.replace(/Ä/g,&quot;Ä&quot;);<br />	html = html.replace(/Å/g,&quot;Å&quot;);<br />	html = html.replace(/Æ/g,&quot;Æ&quot;);<br />	html = html.replace(/Ç/g,&quot;Ç&quot;);<br />	html = html.replace(/È/g,&quot;È&quot;);<br />	html = html.replace(/É/g,&quot;É&quot;);<br />	html = html.replace(/Ê/g,&quot;Ê&quot;);<br />	html = html.replace(/Ë/g,&quot;Ë&quot;);<br />	html = html.replace(/Ì/g,&quot;Ì&quot;);<br />	html = html.replace(/Í/g,&quot;Í&quot;);<br />	html = html.replace(/Î/g,&quot;Î&quot;);<br />	html = html.replace(/Ï/g,&quot;Ï&quot;);<br />	html = html.replace(/Ð/g,&quot;Ð&quot;);<br />	html = html.replace(/Ñ/g,&quot;Ñ&quot;);<br />	html = html.replace(/Ò/g,&quot;Ò&quot;);<br />	html = html.replace(/Ó/g,&quot;Ó&quot;);<br />	html = html.replace(/Ô/g,&quot;Ô&quot;);<br />	html = html.replace(/Õ/g,&quot;Õ&quot;);<br />	html = html.replace(/Ö/g,&quot;Ö&quot;);<br />	html = html.replace(/Ø/g,&quot;Ø&quot;);<br />	html = html.replace(/Ù/g,&quot;Ù&quot;);<br />	html = html.replace(/Ú/g,&quot;Ú&quot;);<br />	html = html.replace(/Û/g,&quot;Û&quot;);<br />	html = html.replace(/Ü/g,&quot;Ü&quot;);<br />	html = html.replace(/Ý/g,&quot;Ý&quot;);<br />	html = html.replace(/Þ/g,&quot;Þ&quot;);<br />	html = html.replace(/ß/g,&quot;ß&quot;);<br />	html = html.replace(/à/g,&quot;à&quot;);<br />	html = html.replace(/á/g,&quot;á&quot;);<br />	html = html.replace(/â/g,&quot;â&quot;);<br />	html = html.replace(/ã/g,&quot;ã&quot;);<br />	html = html.replace(/ä/g,&quot;ä&quot;);<br />	html = html.replace(/å/g,&quot;å&quot;);<br />	html = html.replace(/æ/g,&quot;æ&quot;);<br />	html = html.replace(/ç/g,&quot;ç&quot;);<br />	html = html.replace(/è/g,&quot;è&quot;);<br />	html = html.replace(/é/g,&quot;é&quot;);<br />	html = html.replace(/ê/g,&quot;ê&quot;);<br />	html = html.replace(/ë/g,&quot;ë&quot;);<br />	html = html.replace(/ì/g,&quot;ì&quot;);<br />	html = html.replace(/í/g,&quot;í&quot;);<br />	html = html.replace(/î/g,&quot;î&quot;);<br />	html = html.replace(/ï/g,&quot;ï&quot;);<br />	html = html.replace(/ð/g,&quot;ð&quot;);<br />	html = html.replace(/ñ/g,&quot;ñ&quot;);<br />	html = html.replace(/ò/g,&quot;ò&quot;);<br />	html = html.replace(/ó/g,&quot;ó&quot;);<br />	html = html.replace(/ô/g,&quot;ô&quot;);<br />	html = html.replace(/õ/g,&quot;õ&quot;);<br />	html = html.replace(/ö/g,&quot;ö&quot;);<br />	html = html.replace(/ø/g,&quot;ø&quot;);<br />	html = html.replace(/ù/g,&quot;ù&quot;);<br />	html = html.replace(/ú/g,&quot;ú&quot;);<br />	html = html.replace(/û/g,&quot;û&quot;);<br />	html = html.replace(/ü/g,&quot;ü&quot;);<br />	html = html.replace(/ý/g,&quot;ý&quot;);<br />	html = html.replace(/þ/g,&quot;þ&quot;);<br />	html = html.replace(/ÿ/g,&quot;ÿ&quot;);<br />	html = html.replace(/“/g,&quot;“&quot;);<br />	html = html.replace(/”/g,&quot;”&quot;);				<br />	html = html.replace(/Œ/g,&quot;Œ&quot;);<br />	html = html.replace(/œ/g,&quot;œ&quot;);<br />	html = html.replace(/Š/g,&quot;Š&quot;);<br />	html = html.replace(/š/g,&quot;š&quot;);<br />	html = html.replace(/Ÿ/g,&quot;Ÿ&quot;);<br />	html = html.replace(/ˆ/g,&quot;ˆ&quot;);<br />	html = html.replace(/˜/g,&quot;˜&quot;);<br />	html = html.replace(/–/g,&quot;–&quot;);<br />	html = html.replace(/—/g,&quot;—&quot;);<br />	html = html.replace(/‘/g,&quot;‘&quot;);<br />	html = html.replace(/’/g,&quot;’&quot;);<br />	html = html.replace(/‚/g,&quot;‚&quot;);<br />	html = html.replace(/“/g,&quot;“&quot;);<br />	html = html.replace(/”/g,&quot;”&quot;);<br />	html = html.replace(/„/g,&quot;„&quot;);<br />	html = html.replace(/†/g,&quot;†&quot;);<br />	html = html.replace(/‡/g,&quot;‡&quot;);<br />	html = html.replace(/…/g,&quot;…&quot;);<br />	html = html.replace(/‰/g,&quot;‰&quot;);<br />	html = html.replace(/‹/g,&quot;‹&quot;);<br />	html = html.replace(/›/g,&quot;›&quot;);<br />	html = html.replace(/€/g,&quot;€&quot;);	<br /><br />	return html;<br />}]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry090121-153126</id>
		<issued>2009-01-21T00:00:00Z</issued>
		<modified>2009-01-21T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Cleaning out odd characters and multilingual characters when copyed from Word into your form fields</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry090121-152541" />
		<content type="text/html" mode="escaped"><![CDATA[If you need to convert from one encoding type to another: this helps when certain multi-lingual characters don&#039;t show up properly on your browser.<br /> <br />$content = iconv(&quot;ISO-8859-1&quot;,&quot;UTF-8&quot;, $content);<br /> <br />Here is a function that cleans out odd characters and converts them to proper usage when users copy from Word into your form field(including international symbols):<br /> <br />function html_fix($html) <br />{<br />   $html = preg_replace(&#039;/¡/&#039;,&#039;¡&#039;,$html);<br />   $html = preg_replace(&#039;/¤/&#039;,&#039;¤&#039;,$html);<br />   $html = preg_replace(&#039;/¢/&#039;,&#039;¢&#039;,$html);<br />   $html = preg_replace(&#039;/£/&#039;,&#039;£&#039;,$html);<br />   $html = preg_replace(&#039;/¥/&#039;,&#039;¥&#039;,$html);<br />   $html = preg_replace(&#039;/¦/&#039;,&#039;¦&#039;,$html);<br />   $html = preg_replace(&#039;/§/&#039;,&#039;§&#039;,$html);<br />   $html = preg_replace(&#039;/¨/&#039;,&#039;¨&#039;,$html);<br />   $html = preg_replace(&#039;/©/&#039;,&#039;©&#039;,$html);<br />   $html = preg_replace(&#039;/ª/&#039;,&#039;ª&#039;,$html);<br />   $html = preg_replace(&#039;/«/&#039;,&#039;«&#039;,$html);<br />   $html = preg_replace(&#039;/¬/&#039;,&#039;¬&#039;,$html);<br />   $html = preg_replace(&#039;/­/&#039;,&#039;­&#039;,$html);<br />   $html = preg_replace(&#039;/®/&#039;,&#039;®&#039;,$html);<br />   $html = preg_replace(&#039;/™/&#039;,&#039;™&#039;,$html);<br />   $html = preg_replace(&#039;/¯/&#039;,&#039;¯&#039;,$html);<br />   $html = preg_replace(&#039;/°/&#039;,&#039;°&#039;,$html);<br />   $html = preg_replace(&#039;/±/&#039;,&#039;±&#039;,$html);<br />   $html = preg_replace(&#039;/²/&#039;,&#039;²&#039;,$html);<br />   $html = preg_replace(&#039;/³/&#039;,&#039;³&#039;,$html);<br />   $html = preg_replace(&#039;/´/&#039;,&#039;´&#039;,$html);<br />   $html = preg_replace(&#039;/µ/&#039;,&#039;µ&#039;,$html);<br />   $html = preg_replace(&#039;/¶/&#039;,&#039;¶&#039;,$html);<br />   $html = preg_replace(&#039;/·/&#039;,&#039;·&#039;,$html);<br />   $html = preg_replace(&#039;/¸/&#039;,&#039;¸&#039;,$html);<br />   $html = preg_replace(&#039;/¹/&#039;,&#039;¹&#039;,$html);<br />   $html = preg_replace(&#039;/º/&#039;,&#039;º&#039;,$html);<br />   $html = preg_replace(&#039;/»/&#039;,&#039;»&#039;,$html);<br />   $html = preg_replace(&#039;/¼/&#039;,&#039;¼&#039;,$html);<br />   $html = preg_replace(&#039;/½/&#039;,&#039;½&#039;,$html);<br />   $html = preg_replace(&#039;/¾/&#039;,&#039;¾&#039;,$html);<br />   $html = preg_replace(&#039;/¿/&#039;,&#039;¿&#039;,$html);<br />   $html = preg_replace(&#039;/×/&#039;,&#039;×&#039;,$html);<br />   $html = preg_replace(&#039;/÷/&#039;,&#039;÷&#039;,$html);<br />   $html = preg_replace(&#039;/À/&#039;,&#039;À&#039;,$html);<br />   $html = preg_replace(&#039;/Á/&#039;,&#039;Á&#039;,$html);<br />   $html = preg_replace(&#039;/Â/&#039;,&#039;Â&#039;,$html);<br />   $html = preg_replace(&#039;/Ã/&#039;,&#039;Ã&#039;,$html);<br />   $html = preg_replace(&#039;/Ä/&#039;,&#039;Ä&#039;,$html);<br />   $html = preg_replace(&#039;/Å/&#039;,&#039;Å&#039;,$html);<br />   $html = preg_replace(&#039;/Æ/&#039;,&#039;Æ&#039;,$html);<br />   $html = preg_replace(&#039;/Ç/&#039;,&#039;Ç&#039;,$html);<br />   $html = preg_replace(&#039;/È/&#039;,&#039;È&#039;,$html);<br />   $html = preg_replace(&#039;/É/&#039;,&#039;É&#039;,$html);<br />   $html = preg_replace(&#039;/Ê/&#039;,&#039;Ê&#039;,$html);<br />   $html = preg_replace(&#039;/Ë/&#039;,&#039;Ë&#039;,$html);<br />   $html = preg_replace(&#039;/Ì/&#039;,&#039;Ì&#039;,$html);<br />   $html = preg_replace(&#039;/Í/&#039;,&#039;Í&#039;,$html);<br />   $html = preg_replace(&#039;/Î/&#039;,&#039;Î&#039;,$html);<br />   $html = preg_replace(&#039;/Ï/&#039;,&#039;Ï&#039;,$html);<br />   $html = preg_replace(&#039;/Ð/&#039;,&#039;Ð&#039;,$html);<br />   $html = preg_replace(&#039;/Ñ/&#039;,&#039;Ñ&#039;,$html);<br />   $html = preg_replace(&#039;/Ò/&#039;,&#039;Ò&#039;,$html);<br />   $html = preg_replace(&#039;/Ó/&#039;,&#039;Ó&#039;,$html);<br />   $html = preg_replace(&#039;/Ô/&#039;,&#039;Ô&#039;,$html);<br />   $html = preg_replace(&#039;/Õ/&#039;,&#039;Õ&#039;,$html);<br />   $html = preg_replace(&#039;/Ö/&#039;,&#039;Ö&#039;,$html);<br />   $html = preg_replace(&#039;/Ø/&#039;,&#039;Ø&#039;,$html);<br />   $html = preg_replace(&#039;/Ù/&#039;,&#039;Ù&#039;,$html);<br />   $html = preg_replace(&#039;/Ú/&#039;,&#039;Ú&#039;,$html);<br />   $html = preg_replace(&#039;/Û/&#039;,&#039;Û&#039;,$html);<br />   $html = preg_replace(&#039;/Ü/&#039;,&#039;Ü&#039;,$html);<br />   $html = preg_replace(&#039;/Ý/&#039;,&#039;Ý&#039;,$html);<br />   $html = preg_replace(&#039;/Þ/&#039;,&#039;Þ&#039;,$html);<br />   $html = preg_replace(&#039;/ß/&#039;,&#039;ß&#039;,$html);<br />   $html = preg_replace(&#039;/à/&#039;,&#039;à&#039;,$html);<br />   $html = preg_replace(&#039;/á/&#039;,&#039;á&#039;,$html);<br />   $html = preg_replace(&#039;/â/&#039;,&#039;â&#039;,$html);<br />   $html = preg_replace(&#039;/ã/&#039;,&#039;ã&#039;,$html);<br />   $html = preg_replace(&#039;/ä/&#039;,&#039;ä&#039;,$html);<br />   $html = preg_replace(&#039;/å/&#039;,&#039;å&#039;,$html);<br />   $html = preg_replace(&#039;/æ/&#039;,&#039;æ&#039;,$html);<br />   $html = preg_replace(&#039;/ç/&#039;,&#039;ç&#039;,$html);<br />   $html = preg_replace(&#039;/è/&#039;,&#039;è&#039;,$html);<br />   $html = preg_replace(&#039;/é/&#039;,&#039;é&#039;,$html);<br />   $html = preg_replace(&#039;/ê/&#039;,&#039;ê&#039;,$html);<br />   $html = preg_replace(&#039;/ë/&#039;,&#039;ë&#039;,$html);<br />   $html = preg_replace(&#039;/ì/&#039;,&#039;ì&#039;,$html);<br />   $html = preg_replace(&#039;/í/&#039;,&#039;í&#039;,$html);<br />   $html = preg_replace(&#039;/î/&#039;,&#039;î&#039;,$html);<br />   $html = preg_replace(&#039;/ï/&#039;,&#039;ï&#039;,$html);<br />   $html = preg_replace(&#039;/ð/&#039;,&#039;ð&#039;,$html);<br />   $html = preg_replace(&#039;/ñ/&#039;,&#039;ñ&#039;,$html);<br />   $html = preg_replace(&#039;/ò/&#039;,&#039;ò&#039;,$html);<br />   $html = preg_replace(&#039;/ó/&#039;,&#039;ó&#039;,$html);<br />   $html = preg_replace(&#039;/ô/&#039;,&#039;ô&#039;,$html);<br />   $html = preg_replace(&#039;/õ/&#039;,&#039;õ&#039;,$html);<br />   $html = preg_replace(&#039;/ö/&#039;,&#039;ö&#039;,$html);<br />   $html = preg_replace(&#039;/ø/&#039;,&#039;ø&#039;,$html);<br />   $html = preg_replace(&#039;/ù/&#039;,&#039;ù&#039;,$html);<br />   $html = preg_replace(&#039;/ú/&#039;,&#039;ú&#039;,$html);<br />   $html = preg_replace(&#039;/û/&#039;,&#039;û&#039;,$html);<br />   $html = preg_replace(&#039;/ü/&#039;,&#039;ü&#039;,$html);<br />   $html = preg_replace(&#039;/ý/&#039;,&#039;ý&#039;,$html);<br />   $html = preg_replace(&#039;/þ/&#039;,&#039;þ&#039;,$html);<br />   $html = preg_replace(&#039;/ÿ/&#039;,&#039;ÿ&#039;,$html);<br />   $html = preg_replace(&#039;/“/&#039;,&#039;“&#039;,$html);<br />   $html = preg_replace(&#039;/”/&#039;,&#039;”&#039;,$html);    <br />   $html = preg_replace(&#039;/Œ/&#039;,&#039;Œ&#039;,$html);<br />   $html = preg_replace(&#039;/œ/&#039;,&#039;œ&#039;,$html);<br />   $html = preg_replace(&#039;/Š/&#039;,&#039;Š&#039;,$html);<br />   $html = preg_replace(&#039;/š/&#039;,&#039;š&#039;,$html);<br />   $html = preg_replace(&#039;/Ÿ/&#039;,&#039;Ÿ&#039;,$html);<br />   $html = preg_replace(&#039;/ˆ/&#039;,&#039;ˆ&#039;,$html);<br />   $html = preg_replace(&#039;/˜/&#039;,&#039;˜&#039;,$html);<br />   $html = preg_replace(&#039;/–/&#039;,&#039;–&#039;,$html);<br />   $html = preg_replace(&#039;/—/&#039;,&#039;—&#039;,$html);<br />   $html = preg_replace(&#039;/‘/&#039;,&#039;‘&#039;,$html);<br />   $html = preg_replace(&#039;/’/&#039;,&#039;’&#039;,$html);<br />   $html = preg_replace(&#039;/‚/&#039;,&#039;‚&#039;,$html);<br />   $html = preg_replace(&#039;/“/&#039;,&#039;“&#039;,$html);<br />   $html = preg_replace(&#039;/”/&#039;,&#039;”&#039;,$html);<br />   $html = preg_replace(&#039;/„/&#039;,&#039;„&#039;,$html);<br />   $html = preg_replace(&#039;/†/&#039;,&#039;†&#039;,$html);<br />   $html = preg_replace(&#039;/‡/&#039;,&#039;‡&#039;,$html);<br />   $html = preg_replace(&#039;/…/&#039;,&#039;…&#039;,$html);<br />   $html = preg_replace(&#039;/‰/&#039;,&#039;‰&#039;,$html);<br />   $html = preg_replace(&#039;/‹/&#039;,&#039;‹&#039;,$html);<br />   $html = preg_replace(&#039;/›/&#039;,&#039;›&#039;,$html);<br />   $html = preg_replace(&#039;/€/&#039;,&#039;€&#039;,$html); <br />   return $html;<br />}]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry090121-152541</id>
		<issued>2009-01-21T00:00:00Z</issued>
		<modified>2009-01-21T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Create a dynamic rss xml feed with php class</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry090119-214502" />
		<content type="text/html" mode="escaped"><![CDATA[class RSSFeed {<br />	// VARIABLES    <br />	// channel vars    <br />	var $channel_url;    <br />	var $channel_title;   <br />	var $channel_description;    <br />	var $channel_lang;    <br />	var $channel_copyright;    <br />	var $channel_date;    <br />	var $channel_creator;    <br />	var $channel_subject;       <br />	// image    <br />	var $image_url;    <br />	// items    <br />	var $items = array();    <br />	var $nritems;    <br />	// FUNCTIONS    <br />	// constructor    <br />	function RSSFeed() {         <br />		$this-&gt;nritems=0;        <br />		$this-&gt;channel_url=&#039;&#039;;        <br />		$this-&gt;channel_title=&#039;&#039;;        <br />		$this-&gt;channel_description=&#039;&#039;;        <br />		$this-&gt;channel_lang=&#039;&#039;;        <br />		$this-&gt;channel_copyright=&#039;&#039;;        <br />		$this-&gt;channel_date=&#039;&#039;;        <br />		$this-&gt;channel_creator=&#039;&#039;;        <br />		$this-&gt;channel_subject=&#039;&#039;;        <br />		$this-&gt;image_url=&#039;&#039;;    <br />	}       <br />	// set channel vars    <br />	function SetChannel($url, $title, $description, $lang, $copyright, $creator, $subject) {        <br />		$this-&gt;channel_url=$url;        <br />		$this-&gt;channel_title=$title;        <br />		$this-&gt;channel_description=$description;        <br />		$this-&gt;channel_lang=$lang;        <br />		$this-&gt;channel_copyright=$copyright;        <br />		$this-&gt;channel_date=date(&quot;Y-m-d&quot;).&#039;T&#039;.date(&quot;H:i:s&quot;).&#039;+01:00&#039;;        <br />		$this-&gt;channel_creator=$creator;        <br />		$this-&gt;channel_subject=$subject;    <br />	}    <br />	// set image    <br />	function SetImage($url) {        <br />		$this-&gt;image_url=$url;      <br />	}    <br />	// set item    <br />	function SetItem($url, $title, $description) {        <br />		$this-&gt;items[$this-&gt;nritems][&#039;url&#039;]=$url;        <br />		$this-&gt;items[$this-&gt;nritems][&#039;title&#039;]=$title;        <br />		$this-&gt;items[$this-&gt;nritems][&#039;description&#039;]=$description;        <br />		$this-&gt;nritems++;       <br />	}    <br />	// output feed    <br />	function Output() {        <br />		$output =  &#039;&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns=&quot;http://purl.org/rss/1.0/&quot; xmlns:slash=&quot;http://purl.org/rss/1.0/modules/slash/&quot; xmlns:taxo=&quot;http://purl.org/rss/1.0/modules/taxonomy/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:syn=&quot;http://purl.org/rss/1.0/modules/syndication/&quot; xmlns:admin=&quot;http://webns.net/mvcb/&quot; xmlns:feedburner=&quot;http://rssnamespace.org/feedburner/ext/1.0&quot;&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;channel rdf:about=&quot;&#039;.$this-&gt;channel_url.&#039;&quot;&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;title&gt;&#039;.$this-&gt;channel_title.&#039;&lt;/title&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;link&gt;&#039;.$this-&gt;channel_url.&#039;&lt;/link&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;description&gt;&#039;.$this-&gt;channel_description.&#039;&lt;/description&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;dc:language&gt;&#039;.$this-&gt;channel_lang.&#039;&lt;/dc:language&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;dc:rights&gt;&#039;.$this-&gt;channel_copyright.&#039;&lt;/dc:rights&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;dc:date&gt;&#039;.$this-&gt;channel_date.&#039;&lt;/dc:date&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;dc:creator&gt;&#039;.$this-&gt;channel_creator.&#039;&lt;/dc:creator&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;dc:subject&gt;&#039;.$this-&gt;channel_subject.&#039;&lt;/dc:subject&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;items&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;rdf:Seq&gt;&#039;;        <br />		for($k=0; $k&lt;$this-&gt;nritems; $k++) {            <br />			$output .= &#039;&lt;rdf:li rdf:resource=&quot;&#039;.$this-&gt;items[$k][&#039;url&#039;].&#039;&quot;/&gt;&#039;.&quot;\n&quot;;         <br />		};            <br />		$output .= &#039;&lt;/rdf:Seq&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;/items&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;image rdf:resource=&quot;&#039;.$this-&gt;image_url.&#039;&quot;/&gt;&#039;.&quot;\n&quot;;        <br />		$output .= &#039;&lt;/channel&gt;&#039;.&quot;\n&quot;;        <br />		for($k=0; $k&lt;$this-&gt;nritems; $k++) {            <br />			$output .= &#039;&lt;item rdf:about=&quot;&#039;.$this-&gt;items[$k][&#039;url&#039;].&#039;&quot;&gt;&#039;.&quot;\n&quot;;            <br />			$output .= &#039;&lt;title&gt;&#039;.$this-&gt;items[$k][&#039;title&#039;].&#039;&lt;/title&gt;&#039;.&quot;\n&quot;;            <br />			$output .= &#039;&lt;link&gt;&#039;.$this-&gt;items[$k][&#039;url&#039;].&#039;&lt;/link&gt;&#039;.&quot;\n&quot;;            <br />			$output .= &#039;&lt;description&gt;&#039;.$this-&gt;items[$k][&#039;description&#039;].&#039;&lt;/description&gt;&#039;.&quot;\n&quot;;            <br />			$output .= &#039;&lt;feedburner:origLink&gt;&#039;.$this-&gt;items[$k][&#039;url&#039;].&#039;&lt;/feedburner:origLink&gt;&#039;.&quot;\n&quot;;            <br />			$output .= &#039;&lt;/item&gt;&#039;.&quot;\n&quot;;          <br />		};        <br />		$output .= &#039;&lt;/rdf:RDF&gt;&#039;.&quot;\n&quot;;        <br />		return $output;    <br />	}<br />};<br /><br />Use the class this way:<br /><br />$myfeed = new RSSFeed();<br />$myfeed-&gt;SetChannel(&#039;http://www.yousite.com/site-feed.xml&#039;, &#039;Title of your site&#039;, &#039;description of your site&#039;, &#039;en-us&#039;, &#039;Copyright applies&#039;, &#039;author&#039;, &#039;type of site&#039;);<br />$myfeed-&gt;SetImage(&#039;http://www.yoursite.com/logo.gif&#039;);<br />//here is an example using mysql to receive information<br />$sql = &quot;select id, title, content, date from table order by date desc&quot;;<br />$result = mysql_query($sql);<br />while ($row = mysql_fetch_array($result)) {<br /><br />  $link = &quot;http://www.yourstory.com/index.php?s=&quot;.$row[0];<br /><br />  //strip all html tags<br />  $description = strip_tags($row[2]);<br /><br />  $myfeed-&gt;SetItem($link,$row[1],$description);<br />}<br /><br />$out = $myfeed-&gt;output();<br />//you have two options, you can just echo the feed or same it as an xml file in your server<br /><br />// echo $out;<br />$file = &quot;site-feed.xml&quot;;<br />$fh = fopen($file,&#039;w&#039;);<br />fwrite($fh,$out);<br />fclose($fh);<br /><br />////End of code////<br />//Validate your rss feed:  <a href="http://feedvalidator.org" target="_blank" >http://feedvalidator.org</a><br /><br />]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry090119-214502</id>
		<issued>2009-01-20T00:00:00Z</issued>
		<modified>2009-01-20T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Ajax calls using prototype</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry081104-175141" />
		<content type="text/html" mode="escaped"><![CDATA[Protoype is an excellent javascript framework that provides an easy way to make ajax calls.<br /><br />Here is the sample code of how to make the call:<br /><br />//first I am passing a variable that I call id, this would be the row id for the database table being used, for example: if I&#039;m updating the record with the id of 4, I would call:  javascript:dosomethingAjax(&#039;4&#039;);<br />//the id is passed to the file dosome.php that will handle whatever it is you are trying to do<br />//if you want to pass more variables through the ajax call you would use commas to separate them, for example: parameters: {u: id, name: &#039;John&#039;, age: 24}<br /><br />function dosomethingAjax(id) {<br />  var myAjax = new Ajax.Request(&#039;dosome.php&#039;,<br />	{method: &#039;get&#039;, parameters: {u: id},<br />		onComplete: handleResponse});<br />}<br />//once dosome.php gets processed, the ajax call is complete and the following function is called, in this case, I am putting the results inside a div with the id of displayResults<br />function handleResponse(transport) {<br />  document.getElementById(&#039;displayResults&#039;).innerHTML = transport.responseText;<br />}<br /><br />//here is how to setup the dosome.php<br /><br />&lt;?php<br />//the variable u is being passed by the ajax call listed above<br />$id = $_GET[&#039;u&#039;];<br />//do something like update or insert or select<br />echo &quot;Success!&quot;;<br />?&gt;]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry081104-175141</id>
		<issued>2008-11-04T00:00:00Z</issued>
		<modified>2008-11-04T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Form Select State &amp; Show current selection</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry080613-161412" />
		<content type="text/html" mode="escaped"><![CDATA[In this very basic example, the form is going to the same page on submit, assigning the state value to a session and showing the current selection in the drop down.<br /><br />&lt;?php<br />$_SESSION[&#039;STATE&#039;] = $_POST[&#039;STATE&#039;];<br /><br />$temp_st = &quot;type&quot;.$_SESSION[&#039;STATE&#039;];<br />$$temp_st = &quot; selected&quot;;<br />?&gt;<br /><br />&lt;form name=&quot;form&quot; method=&quot;post&quot; action=&quot;&quot;&gt;<br />&lt;select name=&quot;STATE&quot; id=&quot;STATE&quot;<br />&lt;option value=&quot;AL&quot;&lt;?php echo $typeAL; ?&gt;&gt;Alabama&lt;/option&gt;<br />&lt;option value=&quot;AK&quot;&lt;?php echo $typeAK; ?&gt;&gt;Alaska&lt;/option&gt;<br />&lt;option value=&quot;AZ&quot;&lt;?php echo $typeAZ; ?&gt;&gt;Arizona&lt;/option&gt;<br />&lt;option value=&quot;AR&quot;&lt;?php echo $typeAR; ?&gt;&gt;Arkansas&lt;/option&gt;<br />&lt;option value=&quot;CA&quot;&lt;?php echo $typeCA; ?&gt;&gt;California&lt;/option&gt;<br />&lt;option value=&quot;CO&quot;&lt;?php echo $typeCO; ?&gt;&gt;Colorado&lt;/option&gt;<br />&lt;option value=&quot;CT&quot;&lt;?php echo $typeCT; ?&gt;&gt;Connecticut&lt;/option&gt;<br />&lt;option value=&quot;DE&quot;&lt;?php echo $typeDE; ?&gt;&gt;Delaware&lt;/option&gt;<br />&lt;option value=&quot;DC&quot;&lt;?php echo $typeDC; ?&gt;&gt;District of Columbia&lt;/option&gt;<br />&lt;option value=&quot;FL&quot;&lt;?php echo $typeFL; ?&gt;&gt;Florida&lt;/option&gt;<br />&lt;option value=&quot;GA&quot;&lt;?php echo $typeGA; ?&gt;&gt;Georgia&lt;/option&gt;<br />&lt;option value=&quot;HI&quot;&lt;?php echo $typeHI; ?&gt;&gt;Hawaii&lt;/option&gt;<br />&lt;option value=&quot;ID&quot;&lt;?php echo $typeID; ?&gt;&gt;Idaho&lt;/option&gt;<br />&lt;option value=&quot;IL&quot;&lt;?php echo $typeIL; ?&gt;&gt;Illinois&lt;/option&gt;<br />&lt;option value=&quot;IN&quot;&lt;?php echo $typeIN; ?&gt;&gt;Indiana&lt;/option&gt;<br />&lt;option value=&quot;IA&quot;&lt;?php echo $typeIA; ?&gt;&gt;Iowa&lt;/option&gt;<br />&lt;option value=&quot;KS&quot;&lt;?php echo $typeKS; ?&gt;&gt;Kansas&lt;/option&gt;<br />&lt;option value=&quot;KY&quot;&lt;?php echo $typeKY; ?&gt;&gt;Kentucky&lt;/option&gt;<br />&lt;option value=&quot;LA&quot;&lt;?php echo $typeLA; ?&gt;&gt;Louisiana&lt;/option&gt;<br />&lt;option value=&quot;ME&quot;&lt;?php echo $typeME; ?&gt;&gt;Maine&lt;/option&gt;<br />&lt;option value=&quot;MD&quot;&lt;?php echo $typeMD; ?&gt;&gt;Maryland&lt;/option&gt;<br />&lt;option value=&quot;MA&quot;&lt;?php echo $typeMA; ?&gt;&gt;Massachusetts&lt;/option&gt;<br />&lt;option value=&quot;MI&quot;&lt;?php echo $typeMI; ?&gt;&gt;Michigan&lt;/option&gt;<br />&lt;option value=&quot;MN&quot;&lt;?php echo $typeMN; ?&gt;&gt;Minnesota&lt;/option&gt;<br />&lt;option value=&quot;MS&quot;&lt;?php echo $typeMS; ?&gt;&gt;Mississippi&lt;/option&gt;<br />&lt;option value=&quot;MO&quot;&lt;?php echo $typeMO; ?&gt;&gt;Missouri&lt;/option&gt;<br />&lt;option value=&quot;MT&quot;&lt;?php echo $typeMT; ?&gt;&gt;Montana&lt;/option&gt;<br />&lt;option value=&quot;NE&quot;&lt;?php echo $typeNE; ?&gt;&gt;Nebraska&lt;/option&gt;<br />&lt;option value=&quot;NV&quot;&lt;?php echo $typeNV; ?&gt;&gt;Nevada&lt;/option&gt;<br />&lt;option value=&quot;NH&quot;&lt;?php echo $typeNH; ?&gt;&gt;New Hampshire&lt;/option&gt;<br />&lt;option value=&quot;NJ&quot;&lt;?php echo $typeNJ; ?&gt;&gt;New Jersey&lt;/option&gt;<br />&lt;option value=&quot;NM&quot;&lt;?php echo $typeNM; ?&gt;&gt;New Mexico&lt;/option&gt;<br />&lt;option value=&quot;NY&quot;&lt;?php echo $typeNY; ?&gt;&gt;New York&lt;/option&gt;<br />&lt;option value=&quot;NC&quot;&lt;?php echo $typeNC; ?&gt;&gt;North Carolina&lt;/option&gt;<br />&lt;option value=&quot;ND&quot;&lt;?php echo $typeND; ?&gt;&gt;North Dakota&lt;/option&gt;<br />&lt;option value=&quot;OH&quot;&lt;?php echo $typeOH; ?&gt;&gt;Ohio&lt;/option&gt;<br />&lt;option value=&quot;OK&quot;&lt;?php echo $typeOK; ?&gt;&gt;Oklahoma&lt;/option&gt;<br />&lt;option value=&quot;OR&quot;&lt;?php echo $typeOR; ?&gt;&gt;Oregon&lt;/option&gt;<br />&lt;option value=&quot;PA&quot;&lt;?php echo $typePA; ?&gt;&gt;Pennsylvania&lt;/option&gt;<br />&lt;option value=&quot;RI&quot;&lt;?php echo $typeRI; ?&gt;&gt;Rhode Island&lt;/option&gt;<br />&lt;option value=&quot;SC&quot;&lt;?php echo $typeSC; ?&gt;&gt;South Carolina&lt;/option&gt;<br />&lt;option value=&quot;SD&quot;&lt;?php echo $typeSD; ?&gt;&gt;South Dakota&lt;/option&gt;<br />&lt;option value=&quot;TN&quot;&lt;?php echo $typeTN; ?&gt;&gt;Tennessee&lt;/option&gt;<br />&lt;option value=&quot;TX&quot;&lt;?php echo $typeTX; ?&gt;&gt;Texas&lt;/option&gt;<br />&lt;option value=&quot;UT&quot;&lt;?php echo $typeUT; ?&gt;&gt;Utah&lt;/option&gt;<br />&lt;option value=&quot;VT&quot;&lt;?php echo $typeVT; ?&gt;&gt;Vermont&lt;/option&gt;<br />&lt;option value=&quot;VA&quot;&lt;?php echo $typeVA; ?&gt;&gt;Virginia&lt;/option&gt;<br />&lt;option value=&quot;WA&quot;&lt;?php echo $typeWA; ?&gt;&gt;Washington&lt;/option&gt;<br />&lt;option value=&quot;WV&quot;&lt;?php echo $typeWV; ?&gt;&gt;West Virginia&lt;/option&gt;<br />&lt;option value=&quot;WI&quot;&lt;?php echo $typeWI; ?&gt;&gt;Wisconsin&lt;/option&gt;<br />&lt;option value=&quot;WY&quot;&lt;?php echo $typeWY; ?&gt;&gt;Wyoming&lt;/option&gt;<br />&lt;/select&gt;<br />&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;/&gt;<br />&lt;/form&gt;]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry080613-161412</id>
		<issued>2008-06-13T00:00:00Z</issued>
		<modified>2008-06-13T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Validating numbers</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry080212-151602" />
		<content type="text/html" mode="escaped"><![CDATA[ <pre>var digits=&quot;0123456789&quot;<br />var temp  <br /> <br /> <br />if (form.SSN3.value==&quot;&quot;) {<br />  alert(&quot;Please enter your Social Security Number.&quot;)<br />  form.SSN3.focus();<br />  return false;<br /> }<br /> for (var i=0;i&lt;form.SSN3.value.length;i++){<br />  temp=form.SSN3.value.substring(i,i+1)<br />  if (digits.indexOf(temp)==-1){<br />   alert(&quot;Only numbers are accepted in Social Security Number.&quot;)<br />   form.SSN3.focus();<br />  return false;<br />  }<br />  }</pre> ]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry080212-151602</id>
		<issued>2008-02-12T00:00:00Z</issued>
		<modified>2008-02-12T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Date drop down for PHP forms</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry080212-151447" />
		<content type="text/html" mode="escaped"><![CDATA[ <pre>// created by <a href="http://www.dpwebservices.net" target="_blank" >www.dpwebservices.net</a><br /><br />function listbox_day ($name, $default=0) {<br />    $result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />    for ($dayf=01;$dayf&lt;=31;$dayf++) { <br />        if ($default  == $dayf) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />        $result.=&quot;&lt;option value=\&quot;&quot;.date(d, mktime(0,0,0,0,$dayf,2000)).&quot;\&quot; $selected class=\&quot;field\&quot;&gt;&quot;.date(j, mktime(0,0,0,0,$dayf,2000)).&quot;&lt;/option&gt;\n&quot;; <br />    } <br />    $result.=&quot;&lt;/select&gt;\n&quot;; <br />return $result; <br />} <br /><br />function listbox_month ($name, $default=0) { <br />    $result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />    for ($monthf=01;$monthf&lt;=12;$monthf++) { <br />        if ($default  == $monthf) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />        $result.=&quot;&lt;option value=\&quot;&quot;.date(m, mktime(0,0,0,$monthf,1,2000)).&quot;\&quot; $selected class=\&quot;field\&quot;&gt;&quot;.date(M, mktime(0,0,0,$monthf,1,2000)).&quot;&lt;/option&gt;\n&quot;; <br />    } <br />    $result.=&quot;&lt;/select&gt;\n&quot;; <br />return $result; <br />} <br /><br />function listbox_year ($name, $start, $end, $default=0) { <br />    $result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />    for ($yearf=$end;$yearf&gt;=$start;$yearf--) { <br />        if ($default  == $yearf) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />        $result.=&quot;&lt;option value=\&quot;$yearf\&quot; $selected class=\&quot;field\&quot;&gt;$yearf&lt;/option&gt;\n&quot;; <br />    } <br />    $result.=&quot;&lt;/select&gt;\n&quot;; <br />return $result; <br />}<br /><br />function listbox_hour ($name, $default=0) { <br />    $result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />    for ($hourf=1;$hourf&lt;=12;$hourf++) { <br />        if ($default  == $hourf) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />        $result.=&quot;&lt;option value=\&quot;&quot;.date(h, mktime($hourf,0,0,0,0,2000)).&quot;\&quot; $selected&gt;&quot;.date(g, mktime($hourf,0,0,0,0,2000)).&quot;&lt;/option&gt;\n&quot;; <br />    } <br />    $result.=&quot;&lt;/select&gt;\n&quot;; <br />return $result; <br />} <br /><br />function listbox_24hour ($name, $default=0) { <br />    $result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />    for ($hourf=00;$hourf&lt;=23;$hourf++) { <br />        if ($default  == $hourf) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />        $result.=&quot;&lt;option value=\&quot;&quot;.date(H, mktime($hourf,0,0,0,0,2000)).&quot;\&quot; $selected&gt;&quot;.date(H, mktime($hourf,0,0,0,0,2000)).&quot;&lt;/option&gt;\n&quot;; <br />    } <br />    $result.=&quot;&lt;/select&gt;\n&quot;; <br />return $result; <br />} <br /><br />function listbox_min ($name, $default=0) { <br />    $result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />    for ($minf=00;$minf&lt;=59;$minf++) { <br />        if ($default  == $minf) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />        $result.=&quot;&lt;option value=\&quot;&quot;.date(i, mktime(0,$minf,0,0,0,2000)).&quot;\&quot; $selected&gt;&quot;.date(i, mktime(0,$minf,0,0,0,2000)).&quot;&lt;/option&gt;\n&quot;; <br />    } <br />    $result.=&quot;&lt;/select&gt;\n&quot;; <br />return $result; <br />} <br /><br />function listbox_week ($name, $default=0) { <br />		$result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />			$weekx = &#039;0&#039;;<br />			for ($week_count=strftime(&quot;%U&quot;); $week_count&gt;=1; $week_count--)  {<br />				$weekx ++;<br />				$str = &#039;-&#039;.$week_count.&#039; week Monday&#039;;<br />					if (($timestamp = strtotime($str)) === -1) {<br />						$weekmsg = &quot;The string ($str) is bogus&quot;;<br />					} else {<br /><br />						$weekmsg = &quot;Week &quot;.$weekx.&quot; - &quot;.date(&#039;F j&#039;,$timestamp);<br />						$weekdate = date(m.&#039;/&#039;.d.&#039;/&#039;.y,$timestamp);<br />					<br />					}<br />					// echo $default; weekx to select the week<br />					if ($default == $weekdate) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />						$result.=&quot;&lt;option value=\&quot;&quot;.$weekdate.&quot;\&quot; $selected&gt;&quot;.$weekmsg.&quot;&lt;/option&gt;\n&quot;;<br />					}<br />		$result.=&quot;&lt;/select&gt;\n&quot;; <br />	return $result; <br />} <br /><br />// onChange=\&quot;MM_goToURL(&#039;parent&#039;,&#039;#&#039;);return document.MM_returnValue\&quot;<br /><br />function listbox_nummon ($name, $default=0) { <br />    $result=&quot;&lt;select name=\&quot;$name\&quot; size=1 class=\&quot;submit\&quot;&gt;\n&quot;; <br />    for ($dayf=1;$dayf&lt;=48;$dayf++) { <br />        if ($default  == $dayf) {$selected=&quot;selected&quot;;} else {$selected=&quot;&quot;;} <br />        $result.=&quot;&lt;option value=\&quot;&quot;.$dayf.&quot;\&quot; $selected&gt;&quot;.$dayf.&quot;&lt;/option&gt;\n&quot;; <br />    } <br />    $result.=&quot;&lt;/select&gt;\n&quot;; <br />return $result; <br />} <br /><br />/*<br />example of echos<br /><br /><br />&lt;?php echo listbox_month(&quot;month&quot;, 7); ?&gt; / <br />&lt;?php echo listbox_day(&quot;day&quot;,23); ?&gt; / <br />&lt;?php echo listbox_year(&quot;year&quot;, 1994, 2003, 2001); ?&gt;,&amp;nbsp;<br />&lt;?php echo listbox_hour(&quot;hour&quot;, 12); ?&gt;:<br />&lt;?php echo listbox_min(&quot;min&quot;, 00); ?&gt; <br />);<br />&lt;br&gt;<br />&lt;?php echo listbox_month(&quot;month2&quot;, 1); ?&gt; /<br />&lt;?php echo listbox_day(&quot;day2&quot;, 2); ?&gt; / <br />&lt;?php echo listbox_year(&quot;year2&quot;, 1994, date(Y), 2002); ?&gt;,&amp;nbsp;<br />&lt;?php echo listbox_hour(&quot;hour2&quot;, 11); ?&gt;:<br />&lt;?php echo listbox_min(&quot;min2&quot;, 59); ?&gt; <br /><br />Below is to call the current &quot;week - month day&quot; back to week 1 in a pulldown menu...<br />echo listbox_week(&quot;week&quot;, strftime(&quot;%U&quot;));<br /><br />*/</pre> ]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry080212-151447</id>
		<issued>2008-02-12T00:00:00Z</issued>
		<modified>2008-02-12T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Select between two dates</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry080212-150628" />
		<content type="text/html" mode="escaped"><![CDATA[A few hints when dealing with &quot;between date&quot; searches, these are corrections to oracle manuals that don&#039;t tell you to handle this properly:<br /><br />SELECT *<br />FROM<br />Your Table<br />WHERE<br />DTM_COLUMN BETWEEN TO_DATE(&#039;03-01-2006&#039;, &#039;MM-DD-YYYY&#039;) AND TO_DATE(&#039;03-17-2006&#039;, &#039;MM-DD-YYYY&#039;)+1<br /><br />By using the +1 you get the data between 3/01 to  3/17<br /><br />Without the +1 you get the data between 3/01 to  3/16<br /><br />----<br /><br />Another hint, if you have any queries like the following, you best fix them before the year rolls over...<br /><br />SELECT *<br />FROM<br />WHERE<br />TO_CHAR(DTM_COLUMN, &#039;MM-DD-YYYY&#039;) BETWEEN &#039;03-01-2007&#039; AND &#039;03-17-2007&#039;<br /><br />The above example works fine until you change the start year to 2006...<br />Oracle can not search TO_CHAR unless it is within the same year...<br />]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry080212-150628</id>
		<issued>2008-02-12T00:00:00Z</issued>
		<modified>2008-02-12T00:00:00Z</modified>
	</entry>
	<entry>
		<title>PHP Dynamic Variables</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry080212-150100" />
		<content type="text/html" mode="escaped"><![CDATA[ <pre>Simple PHP code of the day....<br /> <br />Example Scenario: Let&#039;s say you have multiple loops coming out of the database, and you are adding &quot;checked&quot; to specific checkboxes.<br /> <br />Normally you could just do something like this:<br /> <br />$temp = &quot;myVarName&quot;.$i;<br />$$temp = &quot;checked&quot;;<br /> <br />But now let&#039;s say you have multiple loops breaking out in your &lt;tr&gt;...<br />Scary stuff people...<br /> <br />How would you echo $$temp ?<br />HINT: &lt;?php echo $$temp; ?&gt; will not work in this scenario...<br /> <br />hmm give up?<br /> <br />Here&#039;s your Answer:<br /> <br />${&quot;myVarName&quot;.$i}<br /> <br />And that&#039;s the Simple PHP code of the day...</pre> ]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry080212-150100</id>
		<issued>2008-02-12T00:00:00Z</issued>
		<modified>2008-02-12T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Disable print screen</title>
		<link rel="alternate" type="text/html" href="http://www.dpwebservices.net/blog/index.php?entry=entry080212-145923" />
		<content type="text/html" mode="escaped"><![CDATA[ <pre>&lt;html&gt;<br />&lt;head&gt;<br />&lt;script language=&quot;Javascript&quot;&gt;<br />function setClipBoardData(){<br />     setInterval(&quot;window.clipboardData.setData(&#039;text&#039;,&#039;&#039;)&quot;,20);<br />}<br />function blockError(){<br />     window.location.reload(true);<br />     return true;<br />}<br />window.onerror = blockError;<br />&lt;/script&gt;<br /><br />&lt;/head&gt;<br /><br />&lt;body onload=&quot;setClipBoardData();&quot;&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</pre> ]]></content>
		<id>http://www.dpwebservices.net/blog/index.php?entry=entry080212-145923</id>
		<issued>2008-02-12T00:00:00Z</issued>
		<modified>2008-02-12T00:00:00Z</modified>
	</entry>
</feed>
