<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Webcodez - The database of web programming tutorials</title>
	<atom:link href="http://www.webcodez.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webcodez.net</link>
	<description>Archive of tutorials on php,mysql,Javascript,html,css and other coding languages as well as code-snippets.</description>
	<lastBuildDate>Tue, 18 May 2010 16:43:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Understanding HTML</title>
		<link>http://www.webcodez.net/html-css/understanding-html/</link>
		<comments>http://www.webcodez.net/html-css/understanding-html/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:43:49 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[fundamentals]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html faq]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=501</guid>
		<description><![CDATA[What Is HTML?
HTML or Hypertext Markup Language, is the predominant language in  which most Internet web pages are based.  HTML accomplishes a number of  tasks via a web page, including describing the structure of text based  information to be displayed within the page (font sizes, text colors and  formats, etc.), providing [...]]]></description>
			<content:encoded><![CDATA[<p>What Is HTML?</p>
<p>HTML or Hypertext Markup Language, is the predominant language in  which most Internet web pages are based.  HTML accomplishes a number of  tasks via a web page, including describing the structure of text based  information to be displayed within the page (font sizes, text colors and  formats, etc.), providing a means for the user to interact with the  site via web forms, and embedding images and other types media for  display to the user.</p>
<p>When an HTML page is provided to a user’s web browser over the  Internet, the web browser will “translate” the HTML code into the format  that will be displayed to the user.<br />
HTML is written in the form of  labels (known as tags).  Each tag includes an “open” tag and a “close”  tag, and the text that is contained within the opening and closing  tags.  For example, text can be made bold by using the &lt;b&gt; and  &lt;/b&gt; tag pair, so that the following HTML code will display the  bold text word “Hello” in the user’s web browser.<br />
&lt;b&gt;<br />
Hello<br />
&lt;/b&gt;<br />
HTML  pages can also incorporate or embed the code for one or more “scripting  languages”, including JavaScript, PHP, CGI, and ASP.Net.</p>
<p>What Can HTML Do for Me?</p>
<p>HTML provides the basic structure for your website, so it’s the  foundation for your business getting its message to customers and  potential customers.  When you understand the basic principles of HTML,  you can begin to format your web pages to have a more unique and in-  house appearance.  Brand recognition is important in business, and a  little HTML coding can change a template style web page into something  that is unique and recognizable.  In addition to displaying advertising  copy, pictures, brochures and the like, you can also:</p>
<p>· Provide users with a feedback form to submit basic information  to you through the website.<br />
· Generate an email<br />
· Offer a  Guestbook</p>
<p>How Do I Learn HTML?</p>
<p>As you might suspect, there is a seemingly endless supply of  web-based tutorials and instructional materials for learning about  HTML.  There are a number of Internet-based tutorials to get you  started, and to instruct you on any particular detail or HTML feature  that you’re interested in.</p>
<p>Another way to “learn” HTML is simply to create you website using  a web-authoring program, and examine the HTML code behind it.  We’ll  talk about a few of the leading web-authoring programs later in this  article.</p>
<p>Do I Need To Learn It?</p>
<p>Strictly speaking, you don’t need to become an HTML expert to  build and administer your businesses website.  Many of the most popular  tools for website construction include powerful capabilities (including  many that most websites may never utilize).  As an added benefit, some  of these programs are available at no cost.</p>
<p>Since the HTML that serves as the backbone of a website is  basically just text, any text editor (including Microsoft’s Notepad) can  be used to create a website.  Even though writing HTML code directly in  a text editor can eventually help you to better understand what’s going  on “under the hood”, spending the time necessary to become a hardcore  HTML coder might simply not be an option.</p>
<p>In contrast, there are also popular programs that make it much  easier to create your website layout and design through graphical user  interface.  These programs do the heavy lifting, and will automatically  assemble the HTML code based on the design you make.</p>
<p>Dreamweaver</p>
<p>Adobe’s Dreamweaver is one of the leading commercial web design  software packages available today.  Dreamweaver has a reputation within  in the web design community as being very rich in features, and one that  generates very “clean” or more standards-compliant code.  (This means  that, in theory, the Dreamweaver code should run more predictably on a  broader range of web browsers.)  Dreamweaver also has strong support for  CSS, JavaScript, XML, and a variety of other functionalities that are  commonly used on “higher end” websites.  In addition, Dreamweaver has  tight integration with Adobe’s other design programs, including  Photoshop and Flash.  This can be a time-saver if you are using (or  decide to use) those other programs.</p>
<p>On the other hand, Dreamweaver is expensive, compared to other  commercial options.  In addition, many feel that because there are so  many features and functions available in the program, it can be  intimidating for new users and designers.</p>
<p>Expression Web</p>
<p>Microsoft’s Expression Web (the successor to the venerable  FrontPage software) is Microsoft’s web authoring tool and is considered  to be one of the leading web design tool available today.</p>
<p>Expression Web has many (if not most) of the same tools as are  available in Dreamweaver, and boasts strong integration with Microsoft’s  other design and infrastructure products, such as Visual Studio,  SharePoint, and the Office suite of products.  In addition, Expression  Web’s menu structures and look-and-feel will be familiar to users of  other Microsoft Office products, which can make it easier for those  already accustomed to Microsoft products.</p>
<p>Note, however, that the source code that Expression Web generates  is sometimes not as clean as that created by Dreamweaver (or coded  directly into HTML using a simple text editor), so this may result in  some problems (or at least some additional time required) if you decide  to use Dreamweaver to modify a page that was created in Expression Web.   In addition, some page elements (such as tables) can require additional  work if created in one program and then edited in another.</p>
<p>Nvu</p>
<p>For those who want to create relatively simple websites, without  some of the fancy features that are available with Dreamweaver and  Expression Web might wish to consider the open source product Nvu.  Nvu  has a graphical user interface like Dreamweaver and Expression Web, and  is very efficient at making much HTML coding easier and quicker.  As an  open source product, Nvu is free of charge, and relatively well  supported by its user community.</p>
<p>Web-Based Programs and Templates</p>
<p>Finally, be aware that there are a number of web-based authoring  programs (such as Homestead) and template services available.  These  options often require very little effort in terms of design and coding,  and are generally available at very reasonable prices.  Keep in mind,  however, that because most templates are or have been available to other  users, you might wind up with a design that is not unique, or doesn’t  provide your website with a sufficiently distinct identity.</p>
<p>How to Move Forward</p>
<p>At the end of the day, any web authoring tool is likely to have  both have pluses and minuses.  Before committing to license any  particular package, take a little time to try any available online or  downloadable trial versions of the package.  The key to deciding is to  identify your current and future needs, and balance this against your  budget for the project.  While choosing a particular tool won’t forever  tie you to using that same tool in the future, making a thoughtful  decision at the outset can help you to avoid spending time making  corrections and adjustments down the road.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/html-css/understanding-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Chm HTML Help Files Easily</title>
		<link>http://www.webcodez.net/html-css/create-chm-html-help-files-easily/</link>
		<comments>http://www.webcodez.net/html-css/create-chm-html-help-files-easily/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:42:02 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[chm html]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[create chm html]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=499</guid>
		<description><![CDATA[Introduction to HTML Help CHM format
Nowadays, HTML Help CHM is the standard help format used in most  modern Windows applications. An HTML Help system is completely  stand-alone and can be distributed as a single file (for example,  &#8220;My_Help_File.CHM&#8221;). Thus, a CHM file is practically a kind of the  portable formats for [...]]]></description>
			<content:encoded><![CDATA[<p>Introduction to HTML Help CHM format</p>
<p>Nowadays, HTML Help CHM is the standard help format used in most  modern Windows applications. An HTML Help system is completely  stand-alone and can be distributed as a single file (for example,  &#8220;My_Help_File.CHM&#8221;). Thus, a CHM file is practically a kind of the  portable formats for technical documentation, which can be opened on all  Windows PCs since Windows 98. Thus, any Windows user will be able to  open such a file under Windows 98, ME, 2000, XP, and the latest Vista  operating system as well.</p>
<p>An HTML Help CHM file includes all the features to provide the  end-user with easily navigated tutorial. Everybody of us is probably  familiar with the HTML Help viewer, which has the Table of Contents,  alphabetical Index, and the Search feature, located on the navigation  pane to the left side from the help topic text.</p>
<p>How do I create CHM HTML Help Files?</p>
<p>In fact, there are various tools in the marketplace from primitive  applications to complex and expensive systems for writing technical  documentation that support HTML Help as an output format. However, the  common problem of that software is their non-intuitive and sluggish  interface, complexity, and high price of about $999 per license or even  more! Moreover, you will have to spend a lot of time on learning the  tool before can create even a simple CHM file for your software product.  Now you may be asking if there is another solution to make the process  of creating CHM help an easier way. Fortunately, the answer is &#8220;yes&#8221;.</p>
<p>HelpSmith has an alternative vision of creating CHM Help. If you  download and try HelpSmith available on the vendor&#8217;s web site, you will  be surprised by its straightforward and easy-to-use user interface.  There&#8217;s actually NO learning curve like in many other help authoring  products making you spend hours to figure out how to add new help topic.  Once you have installed HelpSmith on your computer, you can type  &#8220;Hello, World&#8221;, click a button and here is it &#8211; your first help file in  the HTML Help format. Then you can easily add new help topics, create  hyperlinks, help windows, insert graphical files and everything the HTML  Help system allows you to do; the process of working is actually as  simple as working with Microsoft Office applications.</p>
<p>Creating CHM Files with HelpSmith</p>
<p>HelpSmith allows you to easily create CHM HTML Help files. Based upon  the WYSIWYG (&#8220;What-You-See-Is-What-You-Get&#8221;) principle, HelpSmith  provides you with a powerful text editor making the biggest part of  working on a help system &#8211; writing and editing help topics &#8211; a pleasure  to do. Use graphical images, insert full-featured tables, create  hyperlinks, finally, and check spelling as you type just like in  Microsoft Word. Also, you will be able to create the Table of Contents  and the keyword Index for your CHM help system just in several minutes.  Among other important HelpSmith features are the abilities to create Web  Help and printed documentation from the same source help project.</p>
<p>Microsoft HHC.EXE compiler</p>
<p>CHM is not an open file format. So how do third party products allow  you to create it? Like other help authoring tools, HelpSmith uses the  HHC.EXE help compiler to create CHM Files from the source project. The  HHC.EXE HTML Help compiler is freely available with the Microsoft HTML  Help Workshop package which can be downloaded from the product&#8217;s home  page. Once HTML Help Workshop is installed, you should follow these  simple steps to link HHC.EXE with HelpSmith:</p>
<p>Choose &#8220;Options\Tools&#8221; from the menu.<br />
Select &#8220;General\Compilers&#8221;  on the left sidebar.<br />
Specify the full path to the &#8220;HHC.EXE&#8221; file on  your computer (for example, &#8220;c:\Program Files\HTML Help  Workshop\HHC.exe&#8221;).<br />
Click the OK button to save the changed  parameters.</p>
<p>The compiler is installed, the process of working with HHC.EXE is  completely transparent to you, making it a breeze to create CHM HTML  Help documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/html-css/create-chm-html-help-files-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash VS Jquery In Website Development</title>
		<link>http://www.webcodez.net/javascript-ajax/flash-vs-jquery-in-website-development/</link>
		<comments>http://www.webcodez.net/javascript-ajax/flash-vs-jquery-in-website-development/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:39:53 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[Javascript & AJAX]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=496</guid>
		<description><![CDATA[Computer languages are just as important in today’s world as spoken  languages. From its time of inception it has evolved to what it is  today, few codes on which the whole gamut of the web world is rotating.  Two such popular applications are the jQuery and the Adobe Flash.
jQuery is a new [...]]]></description>
			<content:encoded><![CDATA[<p>Computer languages are just as important in today’s world as spoken  languages. From its time of inception it has evolved to what it is  today, few codes on which the whole gamut of the web world is rotating.  Two such popular applications are the jQuery and the Adobe Flash.</p>
<p>jQuery is a new type of fast and concise JavaScript library which  emphasises the interaction between JavaScripts and HTML, whereas Flash  is a multimedia platform which can control vector and raster graphics  and even support bidirectional streaming of audio and video. The  usability of these two applications helped to create popular animation  and interactivity to a plain and simple webpage, that was not possible  before. There are various other interesting things that one can do with  these two applications, which is slowly taking over the world.</p>
<p>Since its introduction in the year 1996, Adobe Flash became quite a  popular method of adding animation and different types of interactivity  to the web pages. With the help of its scripting language called the  ActionScript, Flash took animation to a different level altogether. Then  in the year 2006, jQuery came into being and became the most popular  JavaScript to be used by the web developers. Designed to make navigation  round a document easier and faster, jQuery allows the user to very  efficiently find and manipulate HTML elements with minimum lines of  codes. Even though it isn’t known to be the best solution for 3-D and  vector based graphics, the versatility of jQuery is truly quite  astounding making it a much better alternative to Flash.</p>
<p>In case of Flash, some of the plus points include its extensive  features, 3D capabilities, unfailing appearance in supported browsers,  built-in User Interface and other features, supporting vector artworks,  lots of font options and off course many free and commercial tools are  also available here. Whereas in jQuery, the file size is relatively much  smaller, there are numerous free professional quality programs that one  can use, one can add various types of interactivity to the webpage  elements and its tags and its compatibility is much higher compared with  that of Flash, which includes iPhone, cell phones, PS3 and PSP.</p>
<p>It is thus very important to know when to use either of these two  applications versus each other. While creating a Slide Show, Form  Validation, Drop-down Menus, Tabbed Panels, Pop-ups &amp; Tool-tips, and  Expandable &amp; Collapsible Elements it is ideal to use jQuery. Again  when working with Video or Audio Player, complex Animations, 3Ds and  other forms of complex Multimedia, using Adobe Flash is the best. With  more and more different types of plug-ins becoming available, its best  to know up front what you are trying to achieve and then evaluating both  the technologies before using one.</p>
<p>With the internet on the roll, developers are coming out with new and  new technologies everyday which provides more and more different  alternatives and options for the users to get acquainted with and use  them to its maximum capabilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/javascript-ajax/flash-vs-jquery-in-website-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What you need to know about CSS</title>
		<link>http://www.webcodez.net/html-css/what-you-need-to-know-about-css/</link>
		<comments>http://www.webcodez.net/html-css/what-you-need-to-know-about-css/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:36:50 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css design]]></category>
		<category><![CDATA[css faq]]></category>
		<category><![CDATA[css ready]]></category>
		<category><![CDATA[css website]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=493</guid>
		<description><![CDATA[Style sheet is a progressive breakthrough for the advancement of web.  Today, more and more browsers are implementing style sheets, opening  authors&#8217; eyes to unique features that allow influence over presentation  while preserving platform independence. The advantages of style sheets  have become &#8211; apparent &#8212; and the disadvantage of continually creating [...]]]></description>
			<content:encoded><![CDATA[<p>Style sheet is a progressive breakthrough for the advancement of web.  Today, more and more browsers are implementing style sheets, opening  authors&#8217; eyes to unique features that allow influence over presentation  while preserving platform independence. The advantages of style sheets  have become &#8211; apparent &#8212; and the disadvantage of continually creating  more <strong>HTML</strong> tags &#8212; galore &#8212; for presentation effects with the  gradual development of <strong>CSS</strong>.</p>
<p>Let&#8217;s understand <strong>CSS</strong> in the right perspective.</p>
<p><strong>Style sheets in retrospect </strong></p>
<p>Style sheets have been around in one form or another since the  beginnings of <strong>HTML</strong> in the early 1990s.</p>
<p>As the <strong>HTML</strong> language grew, however, it came to encompass a  wider variety of stylistic capabilities to meet the demands of <strong>web  developers </strong>. With such capabilities, style sheets became less  important, and an external language for the purposes of defining style  attributes was not widely accepted until the development of <strong>CSS</strong>.</p>
<p><strong>Teething problems with implementation of CSS </strong></p>
<p>Many implementations of <strong>CSS</strong> are fraught with inconsistencies,  bugs and other Authors have commonly had to use hacks and workarounds in  order to obtain consistent results across web browsers and platforms.</p>
<p>One of the most well-known <strong>CSS</strong> bugs is the Internet Explorer  box model bug; box widths are interpreted incorrectly in several  versions of the browser, resulting in blocks which appear as expected in  most browsers, but are too narrow when viewed in Internet Explorer. The  bug can be avoided, but not without some cost in terms of  functionality.</p>
<p>This is just one of hundreds of <strong>CSS</strong> bugs that have been  documented in various versions of Internet Explorer,Netscape Mozilla ,  and Opera, many of which reduce the legibility of documents. The  proliferation of such bugs in <strong>CSS</strong> implementations has made it  difficult for designers to achieve a consistent appearance across  platforms.</p>
<p>Currently there is strong competition between Mozilla&#8217;s Gecko layout  engine, Opera&#8217;s Presto layout engine, and the KHTML engine used in both  Apple&#8217;s Safari and the Linux Konqueror browsers &#8211; each of them is  leading in different aspects of <strong>CSS</strong>. Internet Explorer remains  the worst at rendering <strong>CSS</strong> by standards set down by World Wide  Web Consortium as of 2005.</p>
<p><strong>Some breakthroughs </strong>&#8230;</p>
<p>These problems have preisely led the W3C to revise the <strong>CSS2</strong> standard into <strong>CSS2.1</strong>, which may be regarded as something of a  working snapshot of current <strong>CSS</strong> support. <strong>CSS2</strong> properties  which no browser had successfully implemented were dropped, and in a few  cases, defined behaviours were changed to bring the standard into line  with the predominant existing implementations..</p>
<p><strong>What makes style sheets significant enough? </strong></p>
<p>Style sheet represents an enormous step forward for the Web. With the  separation of content and presentation between <strong>HTML</strong> and style  sheets, the Web no longer needs to drift away from the strong ideal of  platform independence that provided the medium with its initial push of  popularity. Authors can finally influence the presentation of documents  without leaving pages unreadable to users</p>
<p>A style sheet is made up of style rules that tell a browser how to  present a document. There are various ways of linking these style rules  to your HTML documents, but the simplest method for starting out is to  use <strong>HTML&#8217;s</strong> STYLE element. This element is placed in the document  HEAD, and it contains the style rules for the page.</p>
<p><strong>Functionality and Usage of CSS </strong></p>
<p><strong>CSS</strong> is well-designed to allow the separation of presentation  and structure. Prior to <strong>CSS</strong>, nearly all of the presentational  attributes of an <strong>HTML</strong> document were contained within the <strong>HTML</strong> code; all font colors, background styles, element alignments, borders  and sizes had to be explicitly described, often repeatedly, in the midst  of the <strong>HTML</strong> code.</p>
<p><strong>CSS</strong> allows authors to move much of that information to a  stylesheet, resulting in considerably simpler <strong>HTML</strong> code. The <strong>HTML</strong> documents become much smaller and web browsers will usually cache  sites&#8217; <strong>CSS</strong> stylesheets. This leads to a reduction in network  traffic and noticeably quicker page downloads.</p>
<p>For example, the <strong>HTML</strong> element h2 specifies that the text  contained within it is a level two heading. It has a lower level of  importance than h1 headings, but a higher level of importance than h3  headings. This aspect of the h2 element is structural .</p>
<p>Customarily, headings are rendered in decreasing order of size, with  h1 as the largest, because larger headings are usually interpreted to  have greater importance than smaller ones. Headings are also typically  rendered in a bold font in order to give them additional emphasis. The  h2 element may be rendered in bold face, and in a font larger than h3  but smaller than h1 . This aspect of the h2 element is presentational .</p>
<p>Prior to <strong>CSS</strong>, document authors who wanted to assign a specific  color, font, size, or other characteristic to all h2 headings had to  use the <strong>HTML</strong> font element for each occurrence of that heading  type.</p>
<p>Moreover, <strong>CSS</strong> can be used with XML, to allow such structured  documents to be rendered with full stylistic control over layout,  typography, color, and so forth in any suitable user agent or web  browser.</p>
<p>CSS has its share of inconsistencies as well</p>
<p><strong>CSS</strong> may at times be misused, particularly by the author of web  documents. Some developers who are accustomed to designing documents  strictly in <strong>HTML</strong> may overlook or ignore the enabling features of <strong>CSS</strong>.  For instance, a document author who is comfortable with <strong>HTML</strong> markup that mixes presentation with structure may opt to use strictly  embedded <strong>CSS</strong> styles in all documents. While this may be an  improvement over using deprecated <strong>HTML</strong> presentational markup, it  suffers from some of the same problems that mixed-markup <strong>HTML</strong> does; specifically, it entails a similar amount of document maintenance.</p>
<p><strong>Discrepancies compared: CSS vs programming languages </strong></p>
<p><strong>CSS</strong> also shares some pitfalls common with programming  languages. In particular, the problem of choosing appropriate names for <strong>CSS</strong> classes and identifiers may afflict <strong>CSS</strong> authors. In the attempt  to choose descriptive names for <strong>CSS</strong> classes, authors might  associate the class name with desired presentational attributes; for  example, a <strong>CSS</strong> class to be applied to emphasized text might be  named &#8220;bigred,&#8221; implying that it is rendered in a large red font.</p>
<p>While such a choice of naming may be intuitive to the document  author, it can cause problems if the author later decides that the  emphasized text should instead be green; the author is left with a <strong>CSS</strong> class called &#8220;bigred&#8221; that describes something that is green. In this  instance, a more appropriate class name might have been &#8220;emphasized,&#8221; to  better describe the purpose or intent of the class, rather than the  appearance of elements of that class.</p>
<p>In a programming language, such a misuse might be analogous to using a  variable name &#8220;five&#8221; for a variable which contains the value 5;  however, if the value of the variable changes to 7, the name is no  longer appropriate.</p>
<p><strong>CSS in a nutshell </strong></p>
<p><strong>CSS</strong> is used by both the authors and readers of web pages to  define colors, fonts, layout, and other aspects of document  presentation. It is designed primarily to enable the separation of  document structure (written in <strong>HTML</strong> or a similar markup language)  from document presentation (written in <strong>CSS</strong>).</p>
<p>This separation provides a number of benefits, including improved  content accessibility, greater flexibility and control in the  specification of presentational characteristics, and reduced complexity  of the structural content. <strong>CSS</strong> is also capable of controlling the  document&#8217;s style separately in alternative rendering methods, such as  on-screen in print, by voice (when read out by a speech-based browser or  screen reader) and on braille based, tactile devices.</p>
<p><strong>CSS</strong> allows complete and total control over the style of a  hypertext document. The only way this can be illustrated in a way that  gets people excited is by demonstrating what it can truly be, once the  reins are placed in the hands of those able to create beauty from  structure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/html-css/what-you-need-to-know-about-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PSD To HTML FAQ</title>
		<link>http://www.webcodez.net/html-css/psd-to-html-faq/</link>
		<comments>http://www.webcodez.net/html-css/psd-to-html-faq/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:33:36 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[html to CSS]]></category>
		<category><![CDATA[photoshop to HTML]]></category>
		<category><![CDATA[PSD to HTML]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=490</guid>
		<description><![CDATA[&#8220;Which of the PSD-to-HTML providers do you work with?&#8221; A few years  ago this question had no sense because&#8230; there were no such companies.  But now PSD-to-XHTML/CSS conversion services are sought-after and  growing fast. Is it just a new fad or a real market need?
The idea of a PSD-to-HTML service is quite [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Which of the PSD-to-HTML providers do you work with?&#8221; A few years  ago this question had no sense because&#8230; there were no such companies.  But now PSD-to-XHTML/CSS conversion services are sought-after and  growing fast. Is it just a new fad or a real market need?</p>
<p>The idea of a PSD-to-HTML service is quite simple. Using Adobe  Photoshop or other software packages, graphic and web designers create  digital images &#8212; files with *.PSD, etc extensions. To convert them into  a webpage template or blog theme, you need to develop HTML code.  PSD-to-HTML companies are those who provide such a transformation.</p>
<p>The emergence of PSD-to-HTML services is not just chance.</p>
<p>A while ago we all celebrated the 20th anniversary of the Web. Media  actively discussed achievements and outlook of the Internet. The  appearance of design-to-HTML coding as a separate service also  illustrates that the Web is becoming more mature. Really, specialization  of labor and tendency to standards compliance are features of  established industries only.</p>
<p><strong>The own niche in the web development process</strong></p>
<p>Each of the web development jobs &#8212; design, HTML/CSS coding, and  programming in PHP, Java, etc. &#8212; plays its own important role and  requires its own specific skills and aptitude.</p>
<p>I like the analogy with music creation: composers (in case of Web &#8212;  designers) express their ideas in images. Then the music (websites) is  written down by means of musical notation (HTML and CSS), arranged for  different types of orchestras (browsers), and complied with  recommendations of musicians&#8217; associations (WWW Consortium) and music  critics (search engines). Of course, quality instruments, sound  equipment, and stage effects are a must (databases, chats, widgets,  etc).</p>
<p>If each job is done properly, the website may get &#8220;Grammy&#8221;, i.e. a  lot of traffic and place #1 in SERPs (search engine results pages).</p>
<p><strong>Web standards, compatibility, and accessibility</strong></p>
<p>PSD-to-HTML providers&#8217; advertisements often say that a resulting  HTML/XHTML/CSS markup will be &#8220;cross-browser compatible, W3C valid, SEO  semantic, and hand-coded.&#8221; Why is it emphasized?</p>
<p><strong>1. Cross-browser compatibility</strong><br />
Users are free in their  choice which of the PC or mobile devices, operating systems or browsers  to utilize. Browser producers are also free in which way to treat a  webpage. To ensure correct website appearance in different environments  and make it accessible to wider audience, browser-specific code is added  to a website HTML/CSS markup.</p>
<p><strong>2. W3C compliance </strong><br />
W3C is World Wide Web Consortium which  develops and approves the main Web guidelines, specifications, and  tools, including HTML and CSS. When a site meets W3C standards, it is  like a Web Quality Certificate. As a first step in evaluating website  validity, you can use W3C sites validator.w3.org and  jigsaw.w3.org/css-validator/.</p>
<p><strong>3. Semantic coding</strong><br />
HTML and CSS allow getting the same  webpage appearance in different ways. Semantic coding implies that you  mark up your website taking into account content meaning and HTML tag  semantics: e.g., main headlines &#8212; with the help of h1 tag (&#8220;heading1&#8243;)  and so forth. Typically a semantic-coded site is more search engine  friendly; search engines &#8220;understand&#8221; it better and rank it higher.</p>
<p>The role of semantic coding has been increasingly growing. Experts  state that the coming Web will be completely semantic and provide more  correct retrieving and processing data both by computers and human  beings.</p>
<p><strong>4. Hand- or automatically coded markup?</strong><br />
In many cases  handcrafted HTML/CSS markups are better than those produced by  specialized software. One of the reasons is a lot of semantic niceties  which are difficult to code automatically. It is like software packages  for design or programming &#8212; they help very much and quicken the process  essentially but they don&#8217;t substitute designers or programmers  completely.</p>
<p><strong>What is the difference between PSD-to-HTML and PSD-to-XHTML  services?</strong></p>
<p>XHTML (eXtensible HTML) is the successor and modern extension of HTML  and is recommended by W3C as a main markup language for today&#8217;s Web.  XHTML/CSS makes a webpage markup more compact and flexible, table-less,  and with clear content and design separation.</p>
<p>But there is a sound marketing/SEO aspect too: &#8220;PSD to HTML&#8221; and &#8220;PSD  to XHTML&#8221; are often used as synonyms in providers&#8217; marketing materials.  Here are some other key-phrases typical for PSD-to-HTML service  advertisements: &#8220;Design to XHTML/CSS&#8221;, &#8220;HTML coding service&#8221;, &#8220;PSD to  markup&#8221;, just to name a few. In fact, PSD-to-HTML companies usually  offer a wide range of services, including conversion of designs (*.psd,  *.ai, *.png) into XHTML/CSS/AJAX markups, blog themes, templates for  shopping carts or content management systems (CMS).</p>
<p>The competition forces PSD-to-HTML providers to develop XHTML/CSS  code in line with the latest Web trends. PSD-to-HTML services help to  make web development faster and easier, allowing designers and back-end  programmers to concentrate on their specific tasks. Who benefit from  that? I think all the Web community.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/html-css/psd-to-html-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Your Website CSS Ready?</title>
		<link>http://www.webcodez.net/html-css/is-your-website-css-ready/</link>
		<comments>http://www.webcodez.net/html-css/is-your-website-css-ready/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:30:36 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css design]]></category>
		<category><![CDATA[css ready]]></category>
		<category><![CDATA[css website]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=488</guid>
		<description><![CDATA[What is CSS ?
CSS or Cascading Style Sheets is a great tool to add a unique  look to your web pages.  CSS enhances fonts, colors, and even the  spacing of your web pages.  It is a useful tool to let you separate your  HTML content from your style. For example, you can [...]]]></description>
			<content:encoded><![CDATA[<p>What is CSS ?</p>
<p>CSS or Cascading Style Sheets is a great tool to add a unique  look to your web pages.  CSS enhances fonts, colors, and even the  spacing of your web pages.  It is a useful tool to let you separate your  HTML content from your style. For example, you can use your HTML file  to create and organize the content, but all of the visual presentation  including the background, fonts, colors, link effects, text formatting,  and spacing are created with a CSS file.</p>
<p>Benefits of CSS</p>
<p>As discussed, CSS makes it easy for you to separate the style and  layout of your HTML files from their informational content.  This means  you can determine the look of your site in one file, and change the  whole site by modifying that single file. It also means you can make  your HTML changes by accessing one file.</p>
<p>This structure provided by CSS also means that you can work with  your web pages so that they look good on any browser.  For example, a  page on Mozilla can look very different than a page seen on internet  explorer.  CSS eliminates that difference.</p>
<p>CSS gives you more control over how your pages look because it is  a more detailed mechanism than HTML.  HTML wasn’t designed for style,  it was designed for document structure.  CSS was designed for style.   This means it is easier for you as a business owner seeking brand  development and recognition to define your “look” and give it a unique  and consistent feel.</p>
<p>Users say that CSS also prints better than HTML documents.   Important if visitors are accessing your content, which they hopefully  are, printing it, and taking it with them or better yet – sharing it  with their friends and associates.  Additionally, the pages allow  visitors to print the entire page as opposed to the partial pages that  HTML often prints.</p>
<p>CSS decreases your page size significantly, making it easier for  your visitors to load your site and all relevant graphics and copy.  It  also means that your web pages can be seen quickly and clearly with  handheld browsers.  This is huge because many people are now surfing the  internet on their cell phones, smart phones, and PDAs.  If your site  doesn’t load quickly, chances are people are going to leave.  If your  site is quickly and clearly accessible – you may have a new customer!   Additionally, it will take up less space on your server if you’re  running close to your limit – and save you less money if you’re being  charge by bandwidth.  This is because CSS requires less code.</p>
<p>CSS enables you to position the code for your content at the top  making your page search engine friendly. Properly marked up, HTML pages  can easily found and properly categorized by search engines.</p>
<p>It is also fairly easy for anyone to learn because CSS already  uses well-known coding elements and principals.</p>
<p>The benefits of CSS include making your web site:<br />
• Faster to  create<br />
• Easier to maintain or change<br />
• More adaptable to fit new  and emerging technologies<br />
• Compact<br />
• Neater and cleaner in the  HTML code</p>
<p>How do I use CSS ?</p>
<p>Cascading Style Sheets can be used in two ways &#8211; internally or  externally. When used internally the CSS code is placed within the  ‘head’ tags of each HTML file. The HTML code basically looks just like  this:<br />
&lt;head&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;style  type=”text/css”&gt;<br />
Place your CSS CONTENT HERE<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p>Externally, your CSS code that would be placed in the HTML file  is now placed in a separate file and linked to the location. The file  type for the CSS code can be created with any text or HTML editor such  as Notepad. Once created there are two ways you can link to your CSS  file:</p>
<p>1. In the head section of every (X)HTML file, appearing as:</p>
<p>&lt;head&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;link  rel=”stylesheet” type=”text/css”rel=&#8221;nofollow&#8221;  onclick=&#8221;javascript:pageTracker._trackPageview(&#8216;/outgoing/article_exit_link&#8217;);&#8221;  href=”style.css” mce_rel=&#8221;nofollow&#8221;  onclick=&#8221;javascript:pageTracker._trackPageview(&#8216;/outgoing/article_exit_link&#8217;);&#8221;  href=”style.css” /&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
2. Using the  @import method, appearing as:</p>
<p>&lt;head&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;style  type=”text/css”&gt; @import url(Path to stylesheet.css) &lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p>So what method do you choose?  That depends on what you need.   For example, internal is used when a designer needs to style only one  page, or different pages with different styles.  Web page designers tend  to prefer an external cascading style sheet. This is because, as noted  earlier in the benefits list, you will only need to edit one CSS file to  change the entire website. Webmasters also find external is better  because they are easier to maintain, they’re more compact, and generally  the appearance is easier to control and stylize.</p>
<p>Potential Concerns</p>
<p>Not all browsers can read CSS.  This is a real concern; however,  the percentage has decreased to the point where less than 1% of browsers  are affected.  What sites are affected?  Older browser versions,  created before CSS was standard, including Netscape 4.0.  Because the  vast majority of browsers are significantly newer than this, and because  the World Wide Web Consortium has recommended the use of CSS, making it  a widely acceptable and recognizable mechanism around the world, all  concerns about using CSS are negligible.</p>
<p>Bottom Line</p>
<p>CSS is a tool that will make your web pages easier to organize  and maintain, your website easier to change, your brand potentially  stronger, your website more compact and easier to load, your search  engine optimization will improve, oh and your pages will just look  better.  There really isn’t a reason to not experiment with CSS and  integrate it into your web site.  Once you begin using and designing  with  CSS, you’ll likely find building sites is more fun, faster, and  they look amazing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/html-css/is-your-website-css-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Script Or Website</title>
		<link>http://www.webcodez.net/php-mysql/php-script-or-website/</link>
		<comments>http://www.webcodez.net/php-mysql/php-script-or-website/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:26:09 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[PHP & MySql]]></category>
		<category><![CDATA[basic PHP file]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[fundamentals]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php simple]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=485</guid>
		<description><![CDATA[Never mind the chicken or the egg. The burning philosophical question  of our cyber age is, which came first, the PHP tutorial script or the  website? You see the list of instructions that your PC follows when it  displays a website on your screen, the software in other words is a  [...]]]></description>
			<content:encoded><![CDATA[<p>Never mind the chicken or the egg. The burning philosophical question  of our cyber age is, which came first, the PHP tutorial script or the  website? You see the list of instructions that your PC follows when it  displays a website on your screen, the software in other words is a  symbolic language called PHP. Itâs called a language, but it is a  language very unlike English, whether it is US or UK or any other kind.</p>
<p>Unlike language as we humans think of it, PHP tutorial scripts are  not meant to be heard or listened too or even spoken. PHP tutorial  scripts are learnt by people in order to be written and then âreadâ  and operated by computers alone.</p>
<p>PHP tutorial scripts are strings of symbols that operate only as  pixels on screen and as digital data on your computers hard disk and on  the servers of your Internet service provider. So have you ever wondered  what happens to all those web pages, words and images when you move  away from the website?</p>
<p>I always imagine them to be like the hologram of Princess Leia in the  Star Wars movie. When you open up a website the PHP script leaps to  life in front of your eyes and just as quickly reverts to PHP encoded  script when you maneuver away from any particular site. So if nobody is  visiting your website at any given time does it exist at all? Rather it  only exists as a PHP tutorial script. That is to say PHP tutorial  scripts only exist in a symbolic world until activated and then they  only exist in a different symbolic world as long as you are looking at  them. âHelp me Obi Wan, youâre my only hope!â</p>
<p>Now you can go to PHP tutorial script websites and learn to write the  language of PHP scripts that will then generate websites of infinite  variety and designed to your PHP scripting. (Really it isnât as  difficult as becoming a Jedi knight). So hence the question that we  began with, (boy arenât you glad you started this?) which came first  the PHP tutorial script or the website?</p>
<p>Am I just contemplating my navel or does all this PHP tutorial script  talk have anything to do with real life. Well quite a lot actually.  âSearch your feelings Luke. You know itâs trueâ? You can turn a  PHP tutorial script into cash and earn a very good living as a PHP  programmer.</p>
<p>The online job site oDesk is finding that number of projects for PHP  programmers is growing faster than any other freelance sector and the  wages paid for these projects are rising faster too. ODesk also report  that âoverall, PHP demand was twice that of any other programming  language. Open source technology, led by PHP and MySQL, is by far the  skill set in highest demand today.&#8221;</p>
<p>PHP tutorial scripts are better than any other coding platform  because it is free. Very flexible and offers a huge support network of  other PHP scripters. There is an extensive library of PHP tutorial  scripts that can be tailored, are transferable and match to fit almost  any web application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/php-mysql/php-script-or-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Tutorials &#8211; The Roundup</title>
		<link>http://www.webcodez.net/php-mysql/php-tutorials-the-roundup/</link>
		<comments>http://www.webcodez.net/php-mysql/php-tutorials-the-roundup/#comments</comments>
		<pubDate>Tue, 18 May 2010 16:11:58 +0000</pubDate>
		<dc:creator>antiSigma</dc:creator>
				<category><![CDATA[PHP & MySql]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[fundamentals]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php simple]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/php-mysql/php-tutorials-the-roundup/</guid>
		<description><![CDATA[In this article I will speak about PHP programming language and try  to make it clear for every newbie which wants to start learning php.  But, for beeing able to start learning this computer programming  language, you should start by understand what is this and what is doing.
Well, PHP is a server-side [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will speak about PHP programming language and try  to make it clear for every newbie which wants to start learning php.  But, for beeing able to start learning this computer programming  language, you should start by understand what is this and what is doing.</p>
<p>Well, PHP is a server-side programming language : server-side? means  that the code is interpreted at level of the PHP engine installed on the  web server. PHP is open-source (free at no cost). Beeing free of charge  makes it very popular and I would say easy to use.</p>
<p>Where can be used php? Everywhere on the web, and I think desktop  application can be coded too with the GTK feature but I dont know much  about it so I will stop here talking about this. On the other side, for  the web application development, you can build dynamic websites,  database driven websites (for example MySQL, PostreSQL, etc.), diverse  web forms like a contact form which will insert the infos into database  system or send details entered in the form to a specified email address,  etc.</p>
<p>How do you start the ball rolling? Well, please start reading  introductory tutorials on php official website, then get a project in  mind and try finding requirements needed for this project. This is the  best way to learn : by practicing, not just reading tons of borring  tutorials.</p>
<p>Once you got a project in mind, you will definitely need a php engine to  be able to execute the code. How do you make this? Simply install a  webserver like apache, add php server to this and mysql database engine.  You&#8217;ll find a lot of documentation to help you doing this or there are a  lot of ready made packs wich includes, php, apache, phpmyadmin, mysql,  etc for example easyphp web server or xampp. They&#8217;re free and easy to  install.</p>
<p>The second thing is to register at specific forums, where you can get  support and help from the php gurus, because you really need fast help  when errors will occure, and by the way, trust me you&#8217;ll encounter a lot  of &#8220;strange&#8221; errors at the begining, which later will become just a  routine.</p>
<p>And lastly, do not forget to get a nice code editor with code colloring,  code auto-completion feature is very important too which will make  developing faster. My tip here is to use Zend IDE (the php company)  which is the best and includes mentioned features. Also, Adobe  Dreamweaver is not bad, you can use that too which is nice for html/css  client side scripting. I assumed that you already know html at least, it  is very recommended to know it to make things clear in programming.</p>
<p>And, for the begining this should be enough for a novice to begin to  learn php programming language at the basic level. Later, with the time  and projects which are mandatory for progress, you&#8217;ll get experience and  will advance maybe to OOP (object oriented programming) which is  another thing important.<br />
Good luck in learning!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/php-mysql/php-tutorials-the-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a simple Blog System &#8211; Part 1</title>
		<link>http://www.webcodez.net/php-mysql/creating-a-simple-blog-system-part-1/</link>
		<comments>http://www.webcodez.net/php-mysql/creating-a-simple-blog-system-part-1/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 18:56:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & MySql]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[mysql_connect]]></category>
		<category><![CDATA[mysql_select_db]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=435</guid>
		<description><![CDATA[Part 1 – Overview of Functions, Database &#38; Files
Overview
In this tutorial we’ll be creating a very simple blog system. We won’t be using OOP yet in this tutorial. For creating a Blog using OOP in PHP, another more advanced tutorial will be written and posted as well. The same goes for creating a more advance [...]]]></description>
			<content:encoded><![CDATA[<h2>Part 1 – Overview of Functions, Database &amp; Files</h2>
<p><h3>Overview</h3>
<p>In this tutorial we’ll be creating a very simple blog system. We won’t be using OOP yet in this tutorial. For creating a Blog using OOP in PHP, another more advanced tutorial will be written and posted as well. The same goes for creating a more advance CMS. However in this tutorial will just be creating a simple Blog system with php functions. Functions will be created for:</p>
<ul>
<li>Connecting to Host &amp; DB</li>
<li>Adding posts</li>
<li>Deleting posts</li>
<li>Adding replies</li>
<li>Deleting replies</li>
<li>Creating categories</li>
<li>Retrieving &amp; Displaying Posts</li>
<li>Add user</li>
<li>Edit user profile</li>
<li>Display user profile</li>
<li>Search</li>
</ul>
<p>Also a simple 2 rows div layout will be created with a side-menu and main content div. </p>
<p><h3>Database</h3>
<p>Let’s start with creating the database for our simple blog. We’ll call it ‘simple_blog’. However you can call it anything you like as long as you set it correctly in the script later on. Now let’s create the tables inside this database.</p>
<p><strong>Table: posts</strong></p>
<p>The fields that need to be created:</p>
<p>[TABLE=6]</p>
<p><strong>SQL:</strong></p>
<pre name="code" class="php:nogutter">
CREATE TABLE IF NOT EXISTS `posts` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) NOT NULL,
  `author` int(250) NOT NULL,
  `message` longtext NOT NULL,
  `timestamp` int(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
</pre>
<p><strong>Table: replies</strong></p>
<p>[TABLE=9]</p>
<pre name="code" class="php:nogutter">
CREATE TABLE IF NOT EXISTS `replies` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `postid` int(250) NOT NULL,
  `author` int(250) NOT NULL,
  `message` mediumtext NOT NULL,
  `timestamp` int(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
</pre>
<p><strong>Table: categories</strong></p>
<p>[TABLE=10]</p>
<pre name="code" class="php:nogutter">
CREATE TABLE IF NOT EXISTS `categories` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
</pre>
<p><strong>Table: members</strong></p>
<p>[TABLE=11]</p>
<pre name="code" class="php:nogutter">
CREATE TABLE IF NOT EXISTS `members` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  `email` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
</pre>
<p><h3>Files</h3>
<p>Now we’ve created our database, so let’s start with an overview of the files we’ll be creating now.</p>
<ul>
<li>functions.php</li>
<li>config.php</li>
<li>profile.php</li>
<li>index.php</li>
<li>post.php</li>
<li>	includes/header.php</li>
<li>	includes/footer.php</li>
<li>	includes/sidebar.php</li>
<li>admin/index.php</li>
<li>admin/functions.php</li>
</ul>
<p> </p>
<p>Let’s start with creating our function to connect  to the database we just made.</p>
<p><strong>File: functions.php</strong></p>
<pre name="code" class="php:nogutter">
&lt;?php

function connect($connection) {

  $host = $connection[‘host’];
  $user = $connection[‘user’];
  $pass = $connection[‘pass’];
  $db    = $connection[‘db’];
  $conn =  mysql_connect($host, $user, $pass);

  If(!$conn)
    die(“Couldn’t connect to host.”);

  $db = mysql_select_db($db);

  If(!$db)
     die(“Couldn’t connect to database.”);

}

?&gt;
</pre>
<p>Allright so first you see we set an argrument variable ‘$connection’ for the function. This variable should be given when calling the function and should contain all host &amp; database info required to connect to the host &amp; database. As you can see inside the function it seperates the sub-variables of the $connection variable into 4 new variables. These are for the host, user, password and database (db). As these are the data required to connect to the host &amp; database and should be set in an array $connection and given to this function with sub-variable ‘host’, ‘user’, ‘pass’ and ‘db’.</p>
<p>We’ll be offering the $connection variable to the function as an array. It will use the sub-variable named ‘host’,  ‘user’, ‘pass’ and ‘db’ to try to establish a connection to the host and database. So these we’ll need to set in our config.php file. We’ll shorten the name of the variable $connection to $conn. As the name of it doesn’t really matter as long as we give it to the function ‘connect’ when calling it.</p>
<p><strong>File: config.php</strong></p>
<pre name="code" class="php:nogutter">
&lt;?php

####CONNECTION CONFIGURATION###
$conn[‘host’] = “localhost”;        // database host (name/IP)
$conn[‘user’] = “root”;                // database host username
$conn[‘pass’] = “password”;      // database host password
$conn[‘db’]    = “simple_blog”; //database name

?&gt;
</pre>
<p>With this info our function ‘connect’ should be able to establish a connection to the host &amp; database.</p>
<p>We set each sub-variable for the $conn array. So we’ve got one variable ( array ) that contains all sub-variables, all info required for establishing a connection to the database. Which our function <strong>connect</strong> will accomplish.</p>
<p>Let’s include these files to the index file already.</p>
<p><strong>File: index.php</strong></p>
<pre name="code" class="php:nogutter">
&lt;?php

include(“functions.php”);

include(“config.php”);

?&gt;
</pre>
<p>We can already use our function to connect to the host &amp; database:</p>
<p><strong>File: index.php</strong></p>
<pre name="code" class="php:nogutter">
&lt;?php

include(“functions.php”);

include(“config.php”);

connect($conn);

?&gt;
</pre>
<p>We provide the array variable $conn to the function which contains all the sub-variables data of host &amp; database ( as we set it in config.php ) required for establishing a connection.</p>
<p><h3>End of part 1</h3>
<p>That’s it so far! In this part we’ve createn the structure of the script for both files, functions &amp; database purpose. And also we’ve made our first function to establish a connection to the database &amp; host using the configurations for the  connection set in our config.php file we created. In the second part we’ll be creating a basic CSS, Div based 2 columns layout. With a side-bar menu and a main content area where all posts will be appearing. Hope to see you in the next part!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/php-mysql/creating-a-simple-blog-system-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Retrieving User Input Data</title>
		<link>http://www.webcodez.net/php-mysql/retrieving-user-input-data/</link>
		<comments>http://www.webcodez.net/php-mysql/retrieving-user-input-data/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 14:19:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & MySql]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[if loop]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[user input]]></category>

		<guid isPermaLink="false">http://www.webcodez.net/?p=460</guid>
		<description><![CDATA[In this tutorial we&#8217;ll be retrieving data from form fields. To do this we&#8217;ll first create an example form. We&#8217;re using the POST method to send the form data in the first example. Will later explain what this means, and how we can then retrieve the data from the form fields. Also the GET method [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial we&#8217;ll be retrieving data from form fields. To do this we&#8217;ll first create an example form. We&#8217;re using the POST method to send the form data in the first example. Will later explain what this means, and how we can then retrieve the data from the form fields. Also the GET method will be explained in this tutorial later on. For the form we set the action to the file itself ( we call it &#8216;form_handle.php&#8217;, call it anything you like ). </p>
<h3>The Form</h3>
<p><strong>File: form_handle.php</strong></p>
<pre name="code" class="php:nogutter">
&lt;form method="POST" action="fom_handle.php">
 &lt;input type="text" name="test_field">
 &lt;input type="submit" name="submit" value="Send!">
&lt;/form>
</pre>
<p><h3>Handling the form data</h3>
<p>Ok in this form we made 2 fields. One text input field, we named &#8216;test_field&#8217; and one submit button we called &#8217;submit&#8217; and already gave the value &#8216;Send!&#8217; to it. Now once the submit button gets pressed, the data of the input fields will be send using the method POST to the file form_handle.php ( as set in the form tag ). This means all values of the input fields will be stored into $_POST['input_field_name'] variables. So in our case we got 2 input fields, and so 2 $_POST variables will be created. One for the field &#8216;test_field&#8217;, which will be stored in $_POST['test_field'], and one for the submit button field we called &#8217;submit&#8217;, which will bestored in $_POST['submit']. So in this way the data will be send to the page once the form gets submitted using the form. The submit button we gave a default value already &#8216;Send!&#8217; so for this input field always this variable will be created:</p>
<p><pre name="code" class="php:nogutter">
$_POST['submit'] = "Send!";
</pre>
</p>
<p>Once the form has been submitted. So we can actually CHECK if the form was submitted, by validating this:</p>
<p><pre name="code" class="php:nogutter">
&lt;?php
if($_POST['submit'] == "Send!") { //form has been submitted correctly?

   //handle form data

}

  //show form

}
?>
</pre>
<p>Because when the form gets submitted, as mentioned above, for each field will be created a variable $_POST['field_name'] and given a value ( either filled in by user or the default value ) which is default set to &#8216;Send!&#8217; for the submit button. So the variable $_POST['submit'] must have been created if the form was submitted and must be given the value &#8216;Send!&#8217; to as we gave it that value inside the form submit button input field. But we also made another input field we called &#8216;test&#8217;. This field we didn&#8217;t gave a value and can be filled in by the user as it&#8217;s a &#8220;text&#8221; input field. Which looks like this:</p>
<p></p>
<input type="text" name="test">
<p></p>
<p>And we want to show what the user filled in there. And as we know the data of the input fields are stored in $_POST['input_field_name'], we can get the data filled in for the field named &#8216;test&#8217; from the variable $_POST['test']. So let&#8217;s do this. But of course only when the form was submitted this is possible, so we use the loop we created to check whether the form was submitted or not:</p>
<p><strong>File: form_handle.php</strong></p>
<pre name="code" class="php:nogutter">
&lt;?php

if($_POST['submit'] == "Send!") { //form has been submitted correctly?

   //handle form data
   echo "<b>Input field: 'test'</b> - You filled in: ".$_POST['test'];

}else{ //not submitted? show form

?>

&lt;form method="POST" action="fom_handle.php">
 &lt;input type="text" name="test_field">
 &lt;input type="submit" name="submit" value="Send!">
&lt;/form>

&lt;?php

}

?>
</pre>
<p>When the form has not been submitted yet, this will output:</p>
<p></p>
<form method="POST" action="fom_handle.php">
<input type="text" name="test_field">
<input type="submit" name="submit" value="Send!">
</form>
<p></p>
<p>Once the form has been submitted this will output:</p>
<p> </p>
<p><b>Input field: &#8216;test&#8217;</b> &#8211; You filled in: [here what the user filled in for this field]</p>
<p>Allright, so those are the basics of retrieving user input data. The same principe works for all other input fields such as checkboxes ( which get their value when they&#8217;re checked ), radio boxes, etc..</p>
<p>However there&#8217;s also a second method: the GET method. It works the same for retrieving the data, they&#8217;re put inside $_GET['input_field_name'] when submitting the form. However, they can be changed inside the url. As they&#8217;re now submited through url. Like:</p>
<blockquote><p>
form_handle.php?submit=Send!&#038;test=what_the_user_filled_in_for_this_field</p></blockquote>
<p>So it could be manipulated very easily by changing that inside the url, and beside that, the user can see all values of as well hidden input fields ( which are given a default value for example ) through url. For example you&#8217;d have an input field:</p>
<pre name="code" class="php:nogutter">
&lt;input type='hidden' name='key' value='myverylongsecretkey2985230'>
</pre>
<p></p>
<p>Then once the form gets submitted using GET method you&#8217;ll see this key just in the url!</p>
<blockquote><p>form_handle.php?key=myverylongsecretkey2985230</p></blockquote>
<p>So you don&#8217;t want that. So usually POST methods are used for securely submitting form, user input data.</p>
<p><h3>End of tutorial</h3>
</p>
<p>We&#8217;ve come to the end of this small tutorial. Hope you learnt something in this tutorial and also have a look at the tutorial about <a href="http://www.webcodez.net/php-mysql/user-input-validation/">User Input Validation</a>. Which can nicely be combined with this tutorial on how to actually first RETRIEVE the user input data before validating it or anything. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webcodez.net/php-mysql/retrieving-user-input-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
