<?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>Bradley Davis</title>
	<atom:link href="http://www.bradley-davis.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bradley-davis.com</link>
	<description>Learner of code / User of WordPress</description>
	<lastBuildDate>Mon, 20 May 2013 02:29:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How To Add Footer Widgets To The-Bootstrap Theme</title>
		<link>http://www.bradley-davis.com/wordpress/how-to-add-footer-widgets-to-the-bootstrap-theme/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-add-footer-widgets-to-the-bootstrap-theme</link>
		<comments>http://www.bradley-davis.com/wordpress/how-to-add-footer-widgets-to-the-bootstrap-theme/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 11:35:11 +0000</pubDate>
		<dc:creator>Bradley D</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Twitter Bootstrap]]></category>

		<guid isPermaLink="false">http://www.bradley-davis.com/?p=4605</guid>
		<description><![CDATA[<p>At the moment this site is a child theme of the-bootstrap theme and one of the features that I wanted was a widgetized footer. I wanted to have three widget areas (sidebars) so I could easily change the content via Appearance -> Widgets and have them named so I can easily identify them, eg, Footer&#8230; <a href="http://www.bradley-davis.com/wordpress/how-to-add-footer-widgets-to-the-bootstrap-theme/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://www.bradley-davis.com/wordpress/how-to-add-footer-widgets-to-the-bootstrap-theme/">How To Add Footer Widgets To The-Bootstrap Theme</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>At the moment this site is a child theme of the-bootstrap theme and one of the features that I wanted was a widgetized footer. I wanted to have three widget areas (sidebars) so I could easily change the content via Appearance -> Widgets and have them named so I can easily identify them, eg, Footer 1, Footer 2 and Footer 3. </p>
<p>Firstly, let&#8217;s get one thing straight! If you are making modifications to a theme, please do it via a child theme (<a title="WordPress Codex - Child Themes" href="http://codex.wordpress.org/Child_Themes" target="_blank">WordPress Codex &#8211; Child Themes</a>). The good people of WordPress will love you for it and send you a WordPress Unicorn for your birthday!</p>
<p>Here is how I added that feature to my the-bootstrap child theme.</p>
<h2>Adding The Function</h2>
<p>In your child theme functions.php file I added the following code.</p>
<pre class="brush: php; title: ; notranslate">
// Adding Footer Widgets Function
function footer_widgets()  {
  register_sidebar(array(
    'name'          =&gt; __( 'Footer 1', 'the-bootstrap' ),
    'id'            =&gt; 'footer-1',
    'before_widget' =&gt; '&lt;aside class=&quot;widget well %2$s&quot; id=&quot;%1$s&quot;&gt;',
    'after_widget'  =&gt; '&lt;/aside&gt;',
    'before_title'  =&gt; '&lt;h2 class=&quot;widget-title&quot;&gt;',
    'after_title'   =&gt; '&lt;/h2&gt;',
  ) );

  register_sidebar(array(
    'name'          =&gt; __( 'Footer 2', 'the-bootstrap' ),
    'id'            =&gt; 'footer-2',
    'before_widget' =&gt; '&lt;aside class=&quot;widget well %2$s&quot; id=&quot;%1$s&quot;&gt;',
    'after_widget'  =&gt; '&lt;/aside&gt;',
    'before_title'  =&gt; '&lt;h2 class=&quot;widget-title&quot;&gt;',
    'after_title'   =&gt; '&lt;/h2&gt;',
  ) );

  register_sidebar(array(
    'name'          =&gt; __( 'Footer 3', 'the-bootstrap' ),
    'id'            =&gt; 'footer-3',
    'before_widget' =&gt; '&lt;aside class=&quot;widget well %2$s&quot; id=&quot;%1$s&quot;&gt;',
    'after_widget'  =&gt; '&lt;/aside&gt;',
    'before_title'  =&gt; '&lt;h2 class=&quot;widget-title&quot;&gt;',
    'after_title'   =&gt; '&lt;/h2&gt;',
  ) );
}
// Hook The 'widgets_init' Action
add_action( 'widgets_init', 'footer_widgets', 11);
</pre>
<p>A few things to note if you are not familiar with functions or adding new sidebars:</p>
<ul>
<li>I renamed the function for this example, but I think it is good practice to name your functions so they are unique.  This will help avoid clashes with other plugins/functions etc. For example, use could your name as part of the function. You will also need to change the function name on line 13 as well, but Line 2 would be: function yourname_footer_widgets() {</li>
<li>Line 3 to 10, line 12 to 19 and line 21 to 28 is a little repetitive, but this will give you 3 new widget areas. You can see that the &#8216;name&#8217; and &#8216;id&#8217; change accordingly for each new widget area.</li>
<li>In the first array of registering a sidebar, take a look at line 6 to 9. This will give your widgets the standard HTML markup of the sidebar widgets, makes for easy styling.</li>
<li>Line 13 adds the function. If you changed your function name, you will need to change &#8216;footer_widgets&#8217; to the new name, eg, &#8216;yourname_footer_widgets&#8217;</li>
<li>I also added a priority of 11, in your widget area this will put your new widget boxes under the standard ones. I think it just makes it a little neater considering they are footer widgets.</li>
</ul>
<h2>Calling Your New Widgets In The Footer</h2>
<p>Now you can call your new widgets in your footer.php file of your child theme. I wanted 3 widget areas so using the Twitter Bootstrap markup, I created a div with a class=&#8221;span12&#8243;, then placed each sidebar/widget in its own div with a class=&#8221;span4&#8243;. Remember they need to add up to 12 (span4 x 3 new widget areas = span12).</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;footer-widget-area&quot; class=&quot;span12&quot;&gt;
  &lt;div class=&quot;footer-widgets-1 span4&quot;&gt;
    &lt;?php dynamic_sidebar( 'footer-1' ); ?&gt;
  &lt;/div&gt;
  &lt;div class=&quot;footer-widgets-2 span4&quot;&gt;
    &lt;?php dynamic_sidebar( 'footer-2' ); ?&gt;
  &lt;/div&gt;
  &lt;div class=&quot;footer-widgets-3 span4&quot;&gt;
    &lt;?php dynamic_sidebar( 'footer-3' ); ?&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;!-- footer-widget-area ends --&gt;
</pre>
<p>You can see that I called footer-1 first so it will be on the left, then 2 and 3. If you added extra sidebars/widget areas or registered less, you will need to change the above HTML to match.</p>
<p>It is up to you where in the footer.php file you call your widgets, I placed my footer widget area just above the div that holds the site-generator id.</p>
<p>The post <a href="http://www.bradley-davis.com/wordpress/how-to-add-footer-widgets-to-the-bootstrap-theme/">How To Add Footer Widgets To The-Bootstrap Theme</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.bradley-davis.com/wordpress/how-to-add-footer-widgets-to-the-bootstrap-theme/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Sixth Sense Marketing&#8217;s New Responsive WordPress Site</title>
		<link>http://www.bradley-davis.com/wordpress/sixth-sense-marketings-new-responsive-wordpress-site/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sixth-sense-marketings-new-responsive-wordpress-site</link>
		<comments>http://www.bradley-davis.com/wordpress/sixth-sense-marketings-new-responsive-wordpress-site/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 06:17:32 +0000</pubDate>
		<dc:creator>Bradley D</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[DevFolio]]></category>
		<category><![CDATA[Twitter Bootstrap]]></category>

		<guid isPermaLink="false">http://www.bradley-davis.com/?p=4397</guid>
		<description><![CDATA[<p>Finally, it is out in the wild! I have had my own business website in production for months to take it to a responsive layout, but development for friends and clients, uni and trying to make a few dollars has always had it on the back burner. But not any more, it is out there&#8230; <a href="http://www.bradley-davis.com/wordpress/sixth-sense-marketings-new-responsive-wordpress-site/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://www.bradley-davis.com/wordpress/sixth-sense-marketings-new-responsive-wordpress-site/">Sixth Sense Marketing&#8217;s New Responsive WordPress Site</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><em>Finally, it is out in the wild! </em></p>
<p>I have had my own business website in production for months to take it to a responsive layout, but development for friends and clients, uni and trying to make a few dollars has always had it on the back burner. But not any more, it is out there running wild with other WordPress powered themes on the interwebs. </p>
<p>Check it out or click the link below. Try it on your tablet or smartphone to see how the site responds to different devices and makes it easy to use/consume and please leave any feedback in the comments below.</p>
<p><img src="http://www.bradley-davis.com/wp-content/uploads/2013/04/ssm.png" alt="Sixth Sense Marketing - Responsive WordPress" width="800" height="647" class="aligncenter size-full wp-image-4398" /></p>
<p>Visit website <a href="http://www.sixthsensemarketing.com.au/" title="Sixth Sense Marketing" target="_blank">here</a></p>
<p>The post <a href="http://www.bradley-davis.com/wordpress/sixth-sense-marketings-new-responsive-wordpress-site/">Sixth Sense Marketing&#8217;s New Responsive WordPress Site</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.bradley-davis.com/wordpress/sixth-sense-marketings-new-responsive-wordpress-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Latest Look For Niseko Webzine &#8211; Japan</title>
		<link>http://www.bradley-davis.com/wordpress/niseko-webzine-japan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=niseko-webzine-japan</link>
		<comments>http://www.bradley-davis.com/wordpress/niseko-webzine-japan/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 04:11:36 +0000</pubDate>
		<dc:creator>Bradley D</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[DevFolio]]></category>
		<category><![CDATA[Japan]]></category>
		<category><![CDATA[Thesis]]></category>

		<guid isPermaLink="false">http://www.bradley-davis.com/?p=1873</guid>
		<description><![CDATA[<p>Niseko Webzine is a personal project. It was born in 2006 on Blogger, at the time because there was a lack of information available to potential tourists wanting to come to Niseko. After a year of being on Blogger, I wanted more flexibility and control over the site, everything was migrated to the current domain&#8230; <a href="http://www.bradley-davis.com/wordpress/niseko-webzine-japan/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://www.bradley-davis.com/wordpress/niseko-webzine-japan/">The Latest Look For Niseko Webzine &#8211; Japan</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Niseko Webzine is a personal project. It was born in 2006 on Blogger, at the time because there was a lack of information available to potential tourists wanting to come to Niseko. After a year of being on Blogger, I wanted more flexibility and control over the site, everything was migrated to the current domain and it was at this point I first used WordPress.</p>
<p>Built on Thesis (DIY Themes), this is its latest look:</p>
<p><img src="http://www.bradley-davis.com/wp-content/uploads/2013/03/niseko-webzine-v21.gif" alt="Niseko Webzine" width="800" height="2232" class="thumbnail aligncenter size-full wp-image-4380" /></p>
<p>Visit Niseko Webzine: <a title="Niseko Webzine" href="http://www.nisekowebzine.com/">www.nisekowebzine.com</a></p>
<p>The post <a href="http://www.bradley-davis.com/wordpress/niseko-webzine-japan/">The Latest Look For Niseko Webzine &#8211; Japan</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.bradley-davis.com/wordpress/niseko-webzine-japan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Booking A Class For A Gym Class</title>
		<link>http://www.bradley-davis.com/university/booking-for-a-gym-class/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=booking-for-a-gym-class</link>
		<comments>http://www.bradley-davis.com/university/booking-for-a-gym-class/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 08:20:53 +0000</pubDate>
		<dc:creator>Bradley D</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.bradley-davis.com/?p=4582</guid>
		<description><![CDATA[<p>This is was a task for a university assignment for a web programming subject. The task: Read in a file containing class availability Display a class timetable Display session times, maximum class size, how many available spots in the class (from file) Provide a channel for the user to book a the class If a&#8230; <a href="http://www.bradley-davis.com/university/booking-for-a-gym-class/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://www.bradley-davis.com/university/booking-for-a-gym-class/">Booking A Class For A Gym Class</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This is was a task for a university assignment for a web programming subject.</p>
<p>The task:</p>
<ul>
<li>Read in a file containing class availability</li>
<li>Display a class timetable</li>
<li>Display session times, maximum class size, how many available spots in the class (from file)</li>
<li>Provide a channel for the user to book a the class</li>
<li>If a booking is made update the details that are output to the class file.</li>
</ul>
<p>To keep things simple, I decided to display the timetable in the main content area of the website and place a booking form in the sidebar that contained:</p>
<ul>
<li>Field &#8211; Name</li>
<li>Field &#8211; Activity &#8211; Drop down box where you can select the activity, eg, Personal Training session</li>
<li>Field &#8211; Session Day &amp; Time &#8211; Drop down box that listed the day and session time, eg, Monday &#8211; 6.30 to 7.30am</li>
<li>Button &#8211; Make A Booking</li>
</ul>
<h2>The PHP To Read In The File, Check &amp; Output The File</h2>
<pre class="brush: php; title: ; notranslate">
&lt;?php

// Read file in for personal training classes
$file = fopen(&quot;activity-pt.txt&quot;, &quot;r&quot;);
$ptDayTime = array();

while (!feof($file)) {
   $ptDayTime[] = fgets($file);
}

// Read file in for aerobics classes
$file = fopen(&quot;activity-ab.txt&quot;, &quot;r&quot;);
$abDayTime = array();

while (!feof($file)) {
   $abDayTime[] = fgets($file);
}

// Check form
if ($_POST['submit']) {

// Variables
$ptformName = $_POST['ptFormName']; 
$formActivity = $_POST['formActivity'];
$formDayTime = $_POST['formDayTime'];
$count = 0;

  // Check name is selected
	if (empty($_POST['ptFormName'])){
	  echo &quot;&lt;p&gt;Please enter your name!&lt;/p&gt;&quot;;
	} else {
	  $ptFormName = $_POST['ptFormName'];
		$count++;
	}
	
	// Checks activity is selected
	if ($_POST['formActivity'] == 'null') {
	  echo &quot;&lt;p&gt;Please select your required activity&lt;/p&gt;&quot;;
	} else {
	  $formActivity = $_POST['formActivity'];
		$count++;
	}
	
	// Checks day and time is selected
	if ($_POST['formDayTime'] == 'null') {
	  echo &quot;&lt;p&gt;Please select your session day and time!&lt;/p&gt;&quot;;
	} else {
	  $formDayTime = $_POST['formDayTime'];
		$count++;
	}
}

// Personal Training Successful booking
if ($count &gt; 2 &amp;&amp; $formActivity == 'pt' &amp;&amp; $ptDayTime[$formDayTime] &lt; 11) {
$ptDayTime[$formDayTime] = $ptDayTime[$formDayTime] + 1;
$ptOutputString = $ptDayTime[0].&quot;\n&quot;
	        .$ptDayTime[1].&quot;\n&quot;
		.$ptDayTime[2].&quot;\n&quot;
		.$ptDayTime[3].&quot;\n&quot;
		.$ptDayTime[4].&quot;\n&quot;
		.$ptDayTime[5].&quot;\n&quot;
		.$ptDayTime[6].&quot;\n&quot;
		.$ptDayTime[7].&quot;\n&quot;
		.$ptDayTime[8].&quot;\n&quot;
		.$ptDayTime[9].&quot;\n&quot;
		.$ptDayTime[10].&quot;\n&quot;
		.$ptDayTime[11].&quot;\n&quot;
		.$ptDayTime[12].&quot;\n&quot;
		.$ptDayTime[13].&quot;\n&quot;
		.$ptDayTime[14].&quot;\n&quot;
		.$ptDayTime[15].&quot;\n&quot;
		.$ptDayTime[16].&quot;\n&quot;
		.$ptDayTime[17].&quot;\n&quot;
		.$ptDayTime[18].&quot;\n&quot;
		.$ptDayTime[19].&quot;\n&quot;
		.$ptDayTime[20].&quot;\n&quot;;
		
  $pt = fopen(&quot;activity-pt.txt&quot;, &quot;w&quot;);
	fwrite($pt, $ptOutputString);
	fclose($pt);
}

// Aerobics Successful booking
if ($count &gt; 2 &amp;&amp; $formActivity == 'ab' &amp;&amp; $abDayTime[$formDayTime] &lt; 11) {
$abDayTime[$formDayTime] = $abDayTime[$formDayTime] + 1;
$abOutputString = $abDayTime[0].&quot;\n&quot;
	        .$abDayTime[1].&quot;\n&quot;
		.$abDayTime[2].&quot;\n&quot;
		.$abDayTime[3].&quot;\n&quot;
		.$abDayTime[4].&quot;\n&quot;
		.$abDayTime[5].&quot;\n&quot;
		.$abDayTime[6].&quot;\n&quot;
		.$abDayTime[7].&quot;\n&quot;
		.$abDayTime[8].&quot;\n&quot;
		.$abDayTime[9].&quot;\n&quot;
		.$abDayTime[10].&quot;\n&quot;
		.$abDayTime[11].&quot;\n&quot;
		.$abDayTime[12].&quot;\n&quot;
		.$abDayTime[13].&quot;\n&quot;
		.$abDayTime[14].&quot;\n&quot;
		.$abDayTime[15].&quot;\n&quot;
		.$abDayTime[16].&quot;\n&quot;
		.$abDayTime[17].&quot;\n&quot;
		.$abDayTime[18].&quot;\n&quot;
		.$abDayTime[19].&quot;\n&quot;
		.$abDayTime[20].&quot;\n&quot;;
		
  $ab = fopen(&quot;activity-ab.txt&quot;, &quot;w&quot;);
	fwrite($ab, $abOutputString);
	fclose($ab);
}
?&gt;
</pre>
<h2>The Timetable HTML</h2>
<pre class="brush: xml; title: ; notranslate">
				  &lt;div id=&quot;content&quot;&gt;
					&lt;h1&gt;Timetable, Bookings &amp;amp; Availability&lt;/h1&gt;
					&lt;p&gt;Feel free to make a booking and check availability&lt;/p&gt;
					&lt;h2&gt;Personal Training&lt;/h2&gt;
					&lt;div id=&quot;timetable-pt&quot;&gt;
					  &lt;div id=&quot;days&quot;&gt;
						  &lt;div class=&quot;rowD&quot;&gt;
							Day
							&lt;/div&gt;
							&lt;div class=&quot;row1&quot;&gt;
							Monday
							&lt;/div&gt;
							&lt;div class=&quot;row2&quot;&gt;
							Tuesday
							&lt;/div&gt;
							&lt;div class=&quot;row3&quot;&gt;
							Wednesday
							&lt;/div&gt;
							&lt;div class=&quot;row4&quot;&gt;
							Thursday
							&lt;/div&gt;
							&lt;div class=&quot;row5&quot;&gt;
							Friday
							&lt;/div&gt;
							&lt;div class=&quot;row6&quot;&gt;
							Saturday
							&lt;/div&gt;
							&lt;div class=&quot;row7&quot;&gt;
							Sunday
							&lt;/div&gt;
						&lt;/div&gt;&lt;!-- #days ends --&gt;
						&lt;div id=&quot;session1&quot;&gt;
							&lt;div class=&quot;rowT1&quot;&gt;
							Session Time&lt;br/&gt;
							6.30am - 7.30am&lt;br/&gt;
							Instructor: Jack D.
							&lt;/div&gt;
							&lt;div class=&quot;row1&quot;&gt;
							Available: &lt;?php $ans0 = 10 - $ptDayTime[0]; 
							  echo &quot;$ans0&quot;;?&gt; &lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row2&quot;&gt;
							Available: &lt;?php $ans1 = 10 - $ptDayTime[1]; 
							  echo &quot;$ans1&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row3&quot;&gt;
							Available: &lt;?php $ans2 = 10 - $ptDayTime[2]; 
							  echo &quot;$ans2&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row4&quot;&gt;
							Available: &lt;?php $ans3 = 10 - $ptDayTime[3]; 
							  echo &quot;$ans3&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row5&quot;&gt;
							Available: &lt;?php $ans4 = 10 - $ptDayTime[4]; 
							  echo &quot;$ans4&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row6&quot;&gt;
							Available: &lt;?php $ans5 = 10 - $ptDayTime[5]; 
							  echo &quot;$ans5&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row7&quot;&gt;
							Available: &lt;?php $ans6 = 10 - $ptDayTime[6]; 
							  echo &quot;$ans6&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
						&lt;/div&gt;&lt;!-- #session1 ends --&gt;
						
						&lt;div id=&quot;session2&quot;&gt;
							&lt;div class=&quot;rowT2&quot;&gt;
							Session Time&lt;br/&gt;
							12.30pm - 2.30pm&lt;br/&gt;
							Instructor: Jim B.
							&lt;/div&gt;
							&lt;div class=&quot;row1&quot;&gt;
							Available: &lt;?php $ans7 = 10 - $ptDayTime[7]; 
							  echo &quot;$ans7&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row2&quot;&gt;
							Available: &lt;?php $ans8 = 10 - $ptDayTime[8]; 
							  echo &quot;$ans8&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row3&quot;&gt;
							Available: &lt;?php $ans9 = 10 - $ptDayTime[9]; 
							  echo &quot;$ans9&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row4&quot;&gt;
							Available: &lt;?php $ans10 = 10 - $ptDayTime[10]; 
							  echo &quot;$ans10&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row5&quot;&gt;
							Available: &lt;?php $ans11 = 10 - $ptDayTime[11]; 
							  echo &quot;$ans11&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row6&quot;&gt;
							Available: &lt;?php $ans12 = 10 - $ptDayTime[12]; 
							  echo &quot;$ans12&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row7&quot;&gt;
							Available: &lt;?php $ans13 = 10 - $ptDayTime[13]; 
							  echo &quot;$ans13&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
						&lt;/div&gt;&lt;!-- #session2 ends --&gt;
						
						&lt;div id=&quot;session3&quot;&gt;
							&lt;div class=&quot;rowT3&quot;&gt;
							Session Time&lt;br/&gt;
							6.30 - 7.30&lt;br/&gt;
							Instructor: Bundy B.
							&lt;/div&gt;
							&lt;div class=&quot;row1&quot;&gt;
							Available: &lt;?php $ans14 = 10 - $ptDayTime[14]; 
							  echo &quot;$ans14&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row2&quot;&gt;
							Available: &lt;?php $ans15 = 10 - $ptDayTime[15]; 
							  echo &quot;$ans15&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row3&quot;&gt;
							Available: &lt;?php $ans16 = 10 - $ptDayTime[16]; 
							  echo &quot;$ans16&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row4&quot;&gt;
							Available: &lt;?php $ans17 = 10 - $ptDayTime[17]; 
							  echo &quot;$ans17&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row5&quot;&gt;
							Available: &lt;?php $ans18 = 10 - $ptDayTime[18]; 
							  echo &quot;$ans18&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row6&quot;&gt;
							Available: &lt;?php $ans19 = 10 - $ptDayTime[19]; 
							  echo &quot;$ans19&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row7&quot;&gt;
							Available: &lt;?php $ans20 = 10 - $ptDayTime[20]; 
							  echo &quot;$ans20&quot;;?&gt;&lt;br/&gt;
							Max size: 10
							&lt;/div&gt;
						&lt;/div&gt;&lt;!-- #session3 ends --&gt;
					&lt;/div&gt;&lt;!-- #timetable-pt ends --&gt;
					&lt;/form&gt;&lt;!-- Registration Form Ends --&gt;
					
					&lt;h3&gt;Aerobics&lt;/h3&gt;
					&lt;div id=&quot;timetable-ab&quot;&gt;
						&lt;div id=&quot;days&quot;&gt;
					    &lt;div class=&quot;rowD&quot;&gt;
						  Day
						  &lt;/div&gt;
						  &lt;div class=&quot;row1&quot;&gt;
						  Monday
						  &lt;/div&gt;
						  &lt;div class=&quot;row2&quot;&gt;
						  Tuesday
						  &lt;/div&gt;
						  &lt;div class=&quot;row3&quot;&gt;
						  Wednesday
						  &lt;/div&gt;
					    &lt;div class=&quot;row4&quot;&gt;
						  Thursday
						  &lt;/div&gt;
						  &lt;div class=&quot;row5&quot;&gt;
						  Friday
						  &lt;/div&gt;
						  &lt;div class=&quot;row6&quot;&gt;
						  Saturday
						  &lt;/div&gt;
						  &lt;div class=&quot;row7&quot;&gt;
						  Sunday
						  &lt;/div&gt;
						&lt;/div&gt;&lt;!-- #days ends --&gt;
						&lt;div id=&quot;session1&quot;&gt;
							&lt;div class=&quot;rowT1&quot;&gt;
							Session Time&lt;br/&gt;
							6.30am - 7.30am&lt;br/&gt;
							Instructor: Bundy B.
							&lt;/div&gt;
							&lt;div class=&quot;row1&quot;&gt;
							Available: &lt;?php $abAns0 = 10 - $abDayTime[0]; 
							  echo &quot;$abAns0&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row2&quot;&gt;
							Available: &lt;?php $abAns1 = 10 - $abDayTime[1]; 
							  echo &quot;$abAns1&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row3&quot;&gt;
							Available: &lt;?php $abAns2 = 10 - $abDayTime[2]; 
							  echo &quot;$abAns2&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row4&quot;&gt;
							Available: &lt;?php $abAns3 = 10 - $abDayTime[3]; 
							  echo &quot;$abAns3&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row5&quot;&gt;
							Available: &lt;?php $abAns4 = 10 - $abDayTime[4]; 
							  echo &quot;$abAns4&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row6&quot;&gt;
							Available: &lt;?php $abAns5 = 10 - $abDayTime[5]; 
							  echo &quot;$abAns5&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row7&quot;&gt;
							Available: &lt;?php $abAns6 = 10 - $abDayTime[6]; 
							  echo &quot;$abAns6&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
						&lt;/div&gt;&lt;!-- #session1 ends --&gt;
						
						&lt;div id=&quot;session2&quot;&gt;
							&lt;div class=&quot;rowT2&quot;&gt;
							Session Time&lt;br/&gt;
							12.30pm - 2.30pm&lt;br/&gt;
							Instructor: Jack D.
							&lt;/div&gt;
							&lt;div class=&quot;row1&quot;&gt;
							Available: &lt;?php $abAns7 = 10 - $abDayTime[7]; 
							  echo &quot;$abAns7&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row2&quot;&gt;
							Available: &lt;?php $abAns8 = 10 - $abDayTime[8]; 
							  echo &quot;$abAns8&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row3&quot;&gt;
							Available: &lt;?php $abAns9 = 10 - $abDayTime[9]; 
							  echo &quot;$abAns9&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row4&quot;&gt;
							Available: &lt;?php $abAns10 = 10 - $abDayTime[10]; 
							  echo &quot;$abAns10&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row5&quot;&gt;
							Available: &lt;?php $abAns11 = 10 - $abDayTime[11]; 
							  echo &quot;$abAns11&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row6&quot;&gt;
							Available: &lt;?php $abAns12 = 10 - $abDayTime[12]; 
							  echo &quot;$abAns12&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row7&quot;&gt;
							Available: &lt;?php $abAns13 = 10 - $abDayTime[13]; 
							  echo &quot;$abAns13&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
						&lt;/div&gt;&lt;!-- #session2 ends --&gt;
						
						&lt;div id=&quot;session3&quot;&gt;
							&lt;div class=&quot;rowT3&quot;&gt;
							Session Time&lt;br/&gt;
							6.30 - 7.30&lt;br/&gt;
							Instructor: Jim B.
							&lt;/div&gt;
							&lt;div class=&quot;row1&quot;&gt;
							Available: &lt;?php $abAns15 = 10 - $abDayTime[15]; 
							  echo &quot;$ans15&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row2&quot;&gt;
							Available: &lt;?php $abAns16 = 10 - $abDayTime[16]; 
							  echo &quot;$ans16&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row3&quot;&gt;
							Available: &lt;?php $abAns17 = 10 - $abDayTime[17]; 
							  echo &quot;$ans17&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row4&quot;&gt;
							Available: &lt;?php $abAns18 = 10 - $abDayTime[18]; 
							  echo &quot;$ans18&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row5&quot;&gt;
							Available: &lt;?php $abAns19 = 10 - $abDayTime[19]; 
							  echo &quot;$ans19&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row6&quot;&gt;
							Available: &lt;?php $abAns20 = 10 - $abDayTime[20]; 
							  echo &quot;$ans20&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
							&lt;div class=&quot;row7&quot;&gt;
							Available: &lt;?php $abAns21 = 10 - $abDayTime[21]; 
							  echo &quot;$abAns21&quot;;?&gt;&lt;br/&gt;
							Max. size: 10
							&lt;/div&gt;
						&lt;/div&gt;&lt;!-- #session3 ends --&gt;
					&lt;/div&gt;&lt;!-- #timetable-ab ends --&gt;
					&lt;/div&gt;&lt;!-- #content ends --&gt;
</pre>
<h2>The Sidebar Booking Form</h2>
<pre class="brush: xml; title: ; notranslate">
					  &lt;form id=&quot;pt-booking-form&quot; action=&quot;bookings.php&quot; method=&quot;post&quot;&gt;
						&lt;!-- Name --&gt;
						&lt;div class=&quot;pt_form_name&quot;&gt;
							&lt;span class=&quot;pt_form_label&quot;&gt;Name:*&lt;/span&gt;&lt;br/&gt;
							&lt;input name=&quot;ptFormName&quot; type=&quot;text&quot; value=&quot;&lt;?php $ptFormName;?&gt;&quot; id=&quot;pt-form-input&quot; /&gt;&lt;br /&gt;
						&lt;/div&gt;&lt;!-- Name Ends --&gt;
						&lt;!-- Activity --&gt;
						&lt;div class=&quot;form_activity&quot;&gt;
						  &lt;span class=&quot;pt_form_label&quot;&gt;Activity:*&lt;/span&gt;&lt;br/&gt;
							&lt;select name=&quot;formActivity&quot; id=&quot;activity&quot;&gt;
							  &lt;option value=&quot;null&quot; selected=&quot;selected&quot;&gt;Choose Activity&lt;/option&gt;
								&lt;option value=&quot;pt&quot;&gt;Personal Training&lt;/option&gt;
								&lt;option value=&quot;ab&quot;&gt;Aerobics&lt;/option&gt;
							&lt;/select&gt;
						&lt;/div&gt;&lt;!-- .Form activity ends --&gt;
						
						&lt;!-- Day &amp; Time --&gt;
						&lt;div class=&quot;form_day_time&quot;&gt;
						  &lt;span class=&quot;pt_form_label&quot;&gt;Session Day &amp;amp; Time*&lt;/span&gt;&lt;br/&gt;
							&lt;select name=&quot;formDayTime&quot; id=&quot;dayTime&quot;&gt;
							  &lt;option value=&quot;null&quot; selected=&quot;selected&quot;&gt;Select Session Day &amp;amp; Time&lt;/option&gt;
								&lt;option value=&quot;0&quot;&gt;Monday 6.30am - 7.30am&lt;/option&gt;
								&lt;option value=&quot;7&quot;&gt;Monday 12.30pm - 2.30pm&lt;/option&gt;
								&lt;option value=&quot;14&quot;&gt;Monday 6.30pm - 7.30pm &lt;/option&gt;
								
								&lt;option value=&quot;1&quot;&gt;Tuesday 6.30am - 7.30am&lt;/option&gt;
								&lt;option value=&quot;8&quot;&gt;Tuesday 12.30pm - 2.30pm&lt;/option&gt;
								&lt;option value=&quot;15&quot;&gt;Tuesday 6.30pm - 7.30pm &lt;/option&gt;
								
								&lt;option value=&quot;2&quot;&gt;Wednesday 6.30am - 7.30am&lt;/option&gt;
								&lt;option value=&quot;9&quot;&gt;Wednesday 12.30pm - 2.30pm&lt;/option&gt;
								&lt;option value=&quot;16&quot;&gt;Wednesday 6.30pm - 7.30pm &lt;/option&gt;
								
								&lt;option value=&quot;3&quot;&gt;Thursday 6.30am - 7.30am&lt;/option&gt;
								&lt;option value=&quot;10&quot;&gt;Thursday 12.30pm - 2.30pm&lt;/option&gt;
								&lt;option value=&quot;17&quot;&gt;Thursday 6.30pm - 7.30pm &lt;/option&gt;
								
								&lt;option value=&quot;4&quot;&gt;Friday 6.30am - 7.30am&lt;/option&gt;
								&lt;option value=&quot;11&quot;&gt;Friday 12.30pm - 2.30pm&lt;/option&gt;
								&lt;option value=&quot;18&quot;&gt;Friday 6.30pm - 7.30pm &lt;/option&gt;
								
								&lt;option value=&quot;5&quot;&gt;Saturday 6.30am - 7.30am&lt;/option&gt;
								&lt;option value=&quot;12&quot;&gt;Saturday 12.30pm - 2.30pm&lt;/option&gt;
								&lt;option value=&quot;19&quot;&gt;Saturday 6.30pm - 7.30pm &lt;/option&gt;
								
								&lt;option value=&quot;6&quot;&gt;Sunday 6.30am - 7.30am&lt;/option&gt;
								&lt;option value=&quot;13&quot;&gt;Sunday 12.30pm - 2.30pm&lt;/option&gt;
								&lt;option value=&quot;20&quot;&gt;Sunday 6.30pm - 7.30pm &lt;/option&gt;
							&lt;/select&gt;
						&lt;/div&gt;
						&lt;!-- Submit --&gt;
						&lt;div&gt;
						  &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Make A Booking&quot; /&gt;
						&lt;/div&gt;
						&lt;!-- Submit Ends --&gt;
						&lt;p&gt;* Required field&lt;/p&gt;
            &lt;/form&gt;

</pre>
<p>The post <a href="http://www.bradley-davis.com/university/booking-for-a-gym-class/">Booking A Class For A Gym Class</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.bradley-davis.com/university/booking-for-a-gym-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Registration Form With PHP Validation</title>
		<link>http://www.bradley-davis.com/university/registration-form-with-php-validation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=registration-form-with-php-validation</link>
		<comments>http://www.bradley-davis.com/university/registration-form-with-php-validation/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 07:38:06 +0000</pubDate>
		<dc:creator>Bradley D</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.bradley-davis.com/?p=4573</guid>
		<description><![CDATA[<p>This was built for a university assignment that I needed to do for a web programming subject. The aim was to make a registration form that would be sitting on a fitness club website. The spec sheet stated that the form and validation code (must be php) be contained in the same file, on validation&#8230; <a href="http://www.bradley-davis.com/university/registration-form-with-php-validation/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://www.bradley-davis.com/university/registration-form-with-php-validation/">Registration Form With PHP Validation</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This was built for a university assignment that I needed to do for a web programming subject. The aim was to make a registration form that would be sitting on a fitness club website. The spec sheet stated that the form and validation code (must be php) be contained in the same file, on validation the information must be outputed to a text file and redirected to a thank you page.</p>
<h2>The PHP validation Code</h2>
<p>This code was placed above the start of the actual markup for the page.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

if ($_POST['submit']) {

 // Variables
 $firstName = $_POST['firstN'];
 $secondName = $_POST['secondN'];
 $dob = $_POST['dob'];
 $email = $_POST['email'];
 $address = $_POST['address'];
 $membershipType = $_POST['membershipType'];
 $creditCardNumber = $_POST['creditCardNumber'];
 $creditCardExpiryM = $_POST['creditCardExpiryM'];
 $creditCardExpiryY = $_POST['creditCardExpiryY'];
 $membershipDuration = $_POST['membershipDuration'];
 $count = 0;

 // Form Validation
 if (empty($_POST['firstName'])) {
 echo &quot;&lt;p&gt;Please enter your first name!&lt;/p&gt;&quot;;
 } else {
 $firstName = $_POST['firstName'];
 $count++;
 }

if (empty($_POST['secondName'])) {
 echo &quot;&lt;p&gt;Please enter your second name!&lt;/p&gt;&quot;;
 } else {
 $secondName = $_POST['secondName'];
 $count++;
 }

 if (empty($_POST['dob'])) {
 // Do nothing
 } else {
 $dob = $_POST['dob'];
 }

 if (empty($_POST['gender'])) {
 // Do nothing
 } else {
 $gender = $_POST['gender'];
 }

 if (empty($_POST['email'])) {
 echo &quot;&lt;p&gt;please enter an email address&lt;/p&gt;&quot;;
 } else {
 if (isset($_POST['email']) == true &amp;&amp; empty($_POST['email']) == false) {
 $email = $_POST['email'];
 if (filter_var($email, FILTER_VALIDATE_EMAIL) == true) {
 $count++;
 } else {
 echo &quot;&lt;p&gt;Please enter a valid email&lt;/p&gt;&quot;;
 }
 }
 }

 if (empty($_POST['address'])) {
 // Do nothing
 } else {
 $address = $_POST['address'];
 }

 if ($_POST['membershipType'] == 'null') {
 echo &quot;&lt;p&gt;Please select a membership type&lt;/p&gt;&quot;;
 } else {
 $membershipType = $_POST['membershipType'];
 $count++;
 }

 if (empty($_POST['creditCardNumber'])) {
 echo &quot;&lt;p&gt;Please enter your credit card number!&lt;/p&gt;&quot;;
 } else {
 $creditCardNumber = $_POST['creditCardNumber'];
 $count++;
 }

 if (empty($_POST['creditCardExpiryM'])) {
 echo &quot;&lt;p&gt;Please enter your credit card expiry month!&lt;/p&gt;&quot;;
 } else {
 $creditCardExpiryM = $_POST['creditCardExpiryM'];
 $count++;
 }

 if (empty($_POST['creditCardExpiryY'])) {
 echo &quot;&lt;p&gt;Please enter your credit card expiry year!&lt;/p&gt;&quot;;
 } else {
 $creditCardExpiryY = $_POST['creditCardExpiryY'];
 $count++;
 }

 if ($_POST['membershipDuration'] == 'null') {
 echo &quot;&lt;p&gt;Please select a membership duration!&lt;/p&gt;&quot;;
 } else {
 $membershipDuration = $_POST['membershipDuration'];
 $count++;
 }

 // Create the string to write to file
 $outputstring = &quot;\n&quot;
 .$firstName.&quot;\t&quot;
 .$secondName.&quot;\t&quot;
 .$dob.&quot;\t&quot;
 .$gender.&quot;\t&quot;
 .$email.&quot;\t&quot;
 .$address.&quot;\t&quot;
 .$membershipType.&quot;\t&quot;
 .$creditCardNumber.&quot;\t&quot;
 .$creditCardExpiryM.&quot;\t&quot;
 .$creditCardExpiryY.&quot;\t&quot;
 .$membershipDuration.&quot;\t&quot;;

if ($count &gt;= 8) {
 // Write to file
 $fp = fopen(&quot;users.txt&quot;, &quot;a&quot;);
 fwrite($fp, $outputstring . PHP_EOL);
 fclose($fp);

 header(&quot;Location: thank-you.php&quot;);
 exit;
 }
}
?&gt;
</pre>
<h2>The Form HTML</h2>
<pre class="brush: php; title: ; notranslate">
&lt;!-- Registration Form --&gt;
 &lt;form action=&quot;register.php&quot; method=&quot;post&quot;&gt;
 &lt;!-- First Name --&gt;
 &lt;div class=&quot;rego_first_name&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;First Name:*&lt;/span&gt;
 &lt;input name=&quot;firstName&quot; type=&quot;text&quot; value=&quot;&lt;?php $firstName;?&gt;&quot; id=&quot;firstname&quot; /&gt;&lt;br /&gt;
 &lt;/div&gt;&lt;!-- First Name Ends --&gt;

 &lt;!-- Second Name --&gt;
 &lt;div class=&quot;rego_second_name&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Second Name:*&lt;/span&gt;
 &lt;input name=&quot;secondName&quot; type=&quot;text&quot; value=&quot;&lt;?php $secondName;?&gt;&quot; id=&quot;secondname&quot; /&gt;
 &lt;/div&gt;&lt;!-- Second Name Ends --&gt;

 &lt;!-- DOB --&gt;
 &lt;div class=&quot;rego_dob&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Date Of Birth:&lt;/span&gt;
 &lt;input name=&quot;dob&quot; type=&quot;text&quot; value=&quot;&lt;?php $dob;?&gt;&quot; id=&quot;dob&quot; /&gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;/div&gt;

 &lt;!-- Gender --&gt;
 &lt;div class=&quot;rego_gender&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Gender: &lt;/span&gt;
 &lt;div id=&quot;rego_radio&quot;&gt;
 &lt;div class=&quot;rego_male&quot;&gt;
 &lt;input name=&quot;gender&quot; type=&quot;radio&quot; id=&quot;mgender&quot; value=&quot;male&quot; /&gt;
 &lt;div id=&quot;rego_mgender_label&quot;&gt;Male&lt;/div&gt;
 &lt;/div&gt;
 &lt;!-- .rego_male ends --&gt;
 &lt;div class=&quot;rego_female&quot;&gt;
 &lt;input name=&quot;gender&quot; type=&quot;radio&quot; id=&quot;fgender&quot; value=&quot;female&quot; /&gt;
 &lt;div id=&quot;rego_fgender_label&quot;&gt;Female&lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;&lt;!-- Gender Ends --&gt;

 &lt;!-- Email --&gt;
 &lt;div class=&quot;rego_email&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Email:*&lt;/span&gt;
 &lt;input name=&quot;email&quot; type=&quot;text&quot; value=&quot;&lt;?php $email;?&gt;&quot; id=&quot;rego_email&quot; /&gt;&lt;br /&gt;
 &lt;/div&gt; &lt;!-- Email Ends --&gt;

 &lt;!-- Address --&gt;
 &lt;div class=&quot;rego_address&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Address:&lt;/span&gt;
 &lt;textarea name=&quot;address&quot; rows=&quot;5&quot; cols=&quot;26&quot; value=&quot;&lt;?php $address;?&gt;&quot;&gt;&lt;/textarea&gt;&lt;br/&gt;
 &lt;/div&gt;&lt;!-- Address Ends --&gt;

 &lt;!-- Membership Type --&gt;
 &lt;div class=&quot;rego_membership&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Membership Type:* &lt;/span&gt;
 &lt;select name=&quot;membershipType&quot; id=&quot;membership&quot;&gt;
 &lt;option value=&quot;null&quot; selected=&quot;selected&quot;&gt;Choose a membership&lt;/option&gt;
 &lt;option value=&quot;bronze&quot;&gt;Bronze&lt;/option&gt;
 &lt;option value=&quot;silver&quot;&gt;Silver&lt;/option&gt;
 &lt;option value=&quot;gold&quot;&gt;Gold&lt;/option&gt;
 &lt;/select&gt;
 &lt;/div&gt;&lt;!-- Membership Type Ends --&gt;

 &lt;!-- Credit Card Number --&gt;
 &lt;div class=&quot;rego_ccn&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Credit Card Number:* &lt;/span&gt;
 &lt;input name=&quot;creditCardNumber&quot; type=&quot;text&quot; value=&quot;&lt;?php $creditCardNumber;?&gt;&quot; id=&quot;ccn&quot; /&gt;
 &lt;/div&gt;&lt;!-- Credit Card Number Ends --&gt;

 &lt;!-- Card Expiry Date --&gt;
 &lt;div class=&quot;rego_cced&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Credit Card Expiry Date:*&lt;/span&gt;
 &lt;input name=&quot;creditCardExpiryM&quot; type=&quot;text&quot; value=&quot;&lt;?php $creditCardExpiryM;?&gt;&quot; id=&quot;creditCardExpiryM&quot; /&gt;
 (Month) / &lt;!-- Don't remove - seperator for expiry date --&gt;
 &lt;input name=&quot;creditCardExpiryY&quot; type=&quot;text&quot; value=&quot;&lt;?php $creditCardExpiryY;?&gt;&quot; id=&quot;creditCardExpiryY&quot; /&gt; (Year)
 &lt;/div&gt;&lt;!-- Card Expiry Date Ends --&gt;


 &lt;!-- Membership Duration --&gt;
 &lt;div class=&quot;rego_membership&quot;&gt;
 &lt;span class=&quot;rego_label&quot;&gt;Duration of Membership:*&lt;/span&gt;
 &lt;select name=&quot;membershipDuration&quot; id=&quot;duration&quot;&gt;
 &lt;option value=&quot;null&quot; selected=&quot;selected&quot;&gt;Choose a duration&lt;/option&gt;
 &lt;option value=&quot;Annual&quot;&gt;Annual&lt;/option&gt;
 &lt;option value=&quot;5 Years&quot;&gt;5 Years&lt;/option&gt;
 &lt;option value=&quot;10 Years&quot;&gt;10 Years&lt;/option&gt;
 &lt;option value=&quot;Lifetime&quot;&gt;Lifetime&lt;/option&gt;
 &lt;/select&gt;
 &lt;/div&gt;
 &lt;!-- Membership Duration Ends --&gt;
 &lt;!-- Submit --&gt;
 &lt;div&gt;
 &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
 &lt;/div&gt;
 &lt;!-- Submit Ends --&gt;
 &lt;/form&gt;&lt;!-- Registration Form Ends --&gt;
</pre>
<p>The post <a href="http://www.bradley-davis.com/university/registration-form-with-php-validation/">Registration Form With PHP Validation</a> appeared first on <a href="http://www.bradley-davis.com">Bradley Davis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.bradley-davis.com/university/registration-form-with-php-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 5/26 queries in 0.071 seconds using disk

 Served from: www.bradley-davis.com @ 2013-05-21 11:04:14 by W3 Total Cache -->