<?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"
	>

<channel>
	<title>Josh Marthaller dot Com</title>
	<atom:link href="http://joshmarthaller.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshmarthaller.com</link>
	<description>Ramblings of a web developer</description>
	<pubDate>Fri, 30 Oct 2009 21:34:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>iMeetzu Meetzing the iPhone VERY soon</title>
		<link>http://joshmarthaller.com/2009/10/30/imeetzu-meetzing-the-iphone-very-soon/</link>
		<comments>http://joshmarthaller.com/2009/10/30/imeetzu-meetzing-the-iphone-very-soon/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 21:23:35 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=92</guid>
		<description><![CDATA[My iMeetzu app has been sluggishly working it&#8217;s way through the approval process of what seems to be 1/2 of an employee at Apple approving these things. Just Joshin&#8217; ya Jobs, but it honestly was under approval for about 8 weeks before we got a response telling us to make some changes before it can [...]]]></description>
			<content:encoded><![CDATA[<p>My iMeetzu app has been sluggishly working it&#8217;s way through the approval process of what seems to be 1/2 of an employee at Apple approving these things. Just Joshin&#8217; ya Jobs, but it honestly was under approval for about 8 weeks before we got a response telling us to make some changes before it can be accepted.  Making changes to an app means getting to the back of the line to be approved again.  The required adjustments have been made and we&#8217;re sitting in line again waiting for this thing to get pushed public.  Since I&#8217;ve had all this time to think about the app, I cleaned it up a ton and made a short video demo attached here at the bottom of this post.  Check it out and let me know what you think.<br />
<center><br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/w1lCUGnXGLQ&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/w1lCUGnXGLQ&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" wmode="transparent"></embed></object><br />
</center><br />
</p>
<p>I changed the layout quite a bit. The colors match the new iMeetzu site and I did away with the iPhone style chat bubbles.  I thought the bubbles were going to be great, but I realized the only thing awesome about them was how hard they were to build in CSS.  They made the app look cheap, and its not! So I had to get rid of those and simplify the chat box with a white background and a single line between messages.  Plus I like having it say &#8220;You&#8221; and &#8220;Stranger&#8221; in the all too infamous red and blue colors.</p>
<p>My final thought on the app is to add in some of the advanced features from the site such as smilies and images.  I haven&#8217;t decided on this yet, but I imagine some of these cool features from the full version of iMeetzu will find their way to the iPhone app.  Luckily most of the changes to the app can be done via some files hosted on one of my servers, so we won&#8217;t always have to wait 2 months in between versions!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/10/30/imeetzu-meetzing-the-iphone-very-soon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Site: Scrabble Word Machine - Cheater Cheaters</title>
		<link>http://joshmarthaller.com/2009/09/02/new-site-scrabble-word-machine-cheater-cheaters/</link>
		<comments>http://joshmarthaller.com/2009/09/02/new-site-scrabble-word-machine-cheater-cheaters/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 03:23:02 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Random]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=90</guid>
		<description><![CDATA[I made this new site Scrabble Word Machine, which is a Scrabble Word Builder.  This handy tool will help all of you Scrabble players build words when you get stumped.  The tool goes as far as to match your tiles with letters on the board if you&#8217;d like to find out which words [...]]]></description>
			<content:encoded><![CDATA[<p>I made this new site <a href="http://www.scrabblewordmachine.com/">Scrabble Word Machine</a>, which is a <a href="http://www.scrabblewordmachine.com/">Scrabble Word Builder</a>.  This handy tool will help all of you Scrabble players build words when you get stumped.  The tool goes as far as to match your tiles with letters on the board if you&#8217;d like to find out which words you could use in a certain spot.  </p>
<p>Have fun all my cheaters out there! I know I&#8217;ll be using it!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/09/02/new-site-scrabble-word-machine-cheater-cheaters/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iMeetzu Hits 100,000 Conversations</title>
		<link>http://joshmarthaller.com/2009/08/28/imeetzu-hits-100000-conversations/</link>
		<comments>http://joshmarthaller.com/2009/08/28/imeetzu-hits-100000-conversations/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 16:52:31 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Business]]></category>

		<category><![CDATA[Marketing]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=88</guid>
		<description><![CDATA[iMeetzu has officially hit 100,000 conversations logged in the last 3 weeks!
]]></description>
			<content:encoded><![CDATA[<p>iMeetzu has officially hit 100,000 conversations logged in the last 3 weeks!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/28/imeetzu-hits-100000-conversations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iMeetzu meets the iPhone (Very Soon)</title>
		<link>http://joshmarthaller.com/2009/08/20/imeetzu-meets-the-iphone-very-soon/</link>
		<comments>http://joshmarthaller.com/2009/08/20/imeetzu-meets-the-iphone-very-soon/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 22:51:47 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=82</guid>
		<description><![CDATA[After pondering the idea of putting iMeetzu into an iPhone application for awhile, I found someone that helped me do just that.  In a couple of weeks you should be able to download the iMeetzu app from the app store for FREE! Thats right, no charge! I took some screen shots from the demo app [...]]]></description>
			<content:encoded><![CDATA[<p>After pondering the idea of putting iMeetzu into an iPhone application for awhile, I found someone that helped me do just that.  In a couple of weeks you should be able to download the iMeetzu app from the app store for FREE! Thats right, no charge! I took some screen shots from the demo app we&#8217;ve got put together so far.  You can see them at the bottom of this post.</p>
<p></p>
<p>I decided to skin the app much like the SMS application for iPhones.  Your messages will be skinned in the SMS chat bubbles.  This should make for a cool iPhone app! The best part of the app is that your conversations will be through the same network as the main site.  So you can chat from your iPhone with another user using the main site, or even another user on the widget!</p>
<p><strong>Keep checking back here for a release date!</strong></p>
<p><center><br />
<br />
Home Screen Icon View:<br />
<img src="http://weborl.com/thuperspace/450-8a5bbcbc1fa05c6e5af69bc62c3ed8cd.png" /></p>
<p>Chatting With a Stranger:<br />
<img src="http://weborl.com/thuperspace/450-a53affefd7440b5d7d01b60edaf25bf6.png" /><br />
</cener></p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/20/imeetzu-meets-the-iphone-very-soon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Old Flash Video I made - William Hung</title>
		<link>http://joshmarthaller.com/2009/08/12/old-flash-video-i-made-william-hung/</link>
		<comments>http://joshmarthaller.com/2009/08/12/old-flash-video-i-made-william-hung/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 19:56:30 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=75</guid>
		<description><![CDATA[Anybody remember William Hung? The crazy Asian guy that probably holds the crown for the worst / funniest American Idol audition of all time?  I made a cartoon video of this in flash right after his audition became famous.  This was probably the first animation I made in flash, not bad for learning, [...]]]></description>
			<content:encoded><![CDATA[<p>Anybody remember William Hung? The crazy Asian guy that probably holds the crown for the worst / funniest American Idol audition of all time?  I made a cartoon video of this in flash right after his audition became famous.  This was probably the first animation I made in flash, not bad for learning, eh?</p>
<p><center><br />
<object width="550" height="400"><param name="movie" value="/lol/hung.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
<embed type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" src="/lol/hung.swf" height="400" width="550"></embed></object><br />
</center></p>
<p>
<strong>I even dug up the actual video so you can see my inspiration:</strong></p>
<p><center><br />
<object width="550" height="400"><param name="movie" value="http://www.youtube.com/v/hsn3WkxKvG4&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/hsn3WkxKvG4&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="550" height="400"></embed></object><br />
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/12/old-flash-video-i-made-william-hung/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iMeetzu Widget - Chat with a stranger on your own website</title>
		<link>http://joshmarthaller.com/2009/08/10/imeetzu-widget-chat-with-a-stranger-on-your-own-website/</link>
		<comments>http://joshmarthaller.com/2009/08/10/imeetzu-widget-chat-with-a-stranger-on-your-own-website/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 22:38:31 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=72</guid>
		<description><![CDATA[I got a great idea from a fellow webmaster this weekend to make a widget out of my iMeetzu application.  What a great way to spread the word around about the site.  I spent a better part of my day Saturday making a lightweight version of iMeetzu that anyone can put on their [...]]]></description>
			<content:encoded><![CDATA[<p>I got a great idea from a fellow webmaster this weekend to make a widget out of my <a href="http://imeetzu.com">iMeetzu</a> application.  What a great way to spread the word around about the site.  I spent a better part of my day Saturday making a lightweight version of iMeetzu that anyone can put on their site with just a small snippet of code.  I actually have put this widget here on my blog as well. You can check it out on the right side of the page.  The widget is integrated with the main system, so you could potentially chat from the widget with another user on the main site. Also you could be chatting through the widget from two separate websites.  My hope is that the widget will get picked up by a lot of bloggers and help iMeetzu grow considerably. </p>
<p>Visit the <a href="http://imeetzu.com/widgetBox.php">iMeetzu Widget</a> page to put iMeetzu on your site.  The widget allows an adjustable size to fit nicely into your site.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/10/imeetzu-widget-chat-with-a-stranger-on-your-own-website/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Frustration Gates v.2 - iMeetzu Promo</title>
		<link>http://joshmarthaller.com/2009/08/07/frustration-gates-v2-imeetzu-promo/</link>
		<comments>http://joshmarthaller.com/2009/08/07/frustration-gates-v2-imeetzu-promo/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 05:16:34 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=65</guid>
		<description><![CDATA[I did a quick remake of my frustration gates flash game to promo my iMeetzu.com project.  The game is a bit harder in this version.  You have to get the box back and forth instead of just across the screen.  Flash games are very commonly &#8217;stolen&#8217; from game websites and put on [...]]]></description>
			<content:encoded><![CDATA[<p>I did a quick remake of my frustration gates flash game to promo my iMeetzu.com project.  The game is a bit harder in this version.  You have to get the box back and forth instead of just across the screen.  Flash games are very commonly &#8217;stolen&#8217; from game websites and put on thousands of small sites.  Some game developer hate this, but I&#8217;m using it to my advantage with the obvious iMeetzu.com promotion in the game.</p>
<p></p>
<div style="z-index:-1">
<center><br />
<embed width="500" height="364" src="http://joshmarthaller.com/games/gates2.swf" wmode="transparent" /><br />
</center>
</div>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/07/frustration-gates-v2-imeetzu-promo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Frustration Gates Flash Game</title>
		<link>http://joshmarthaller.com/2009/08/07/frustration-gates-flash-game/</link>
		<comments>http://joshmarthaller.com/2009/08/07/frustration-gates-flash-game/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 23:34:16 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=61</guid>
		<description><![CDATA[I made this flash game here.  Simple and challenging.  GOOD LUCK




How far did you make it??
]]></description>
			<content:encoded><![CDATA[<p>I made this flash game here.  Simple and challenging.  GOOD LUCK</p>
<p>
<center><br />
<embed width="500" height="364" src="http://boreddaily.com/games/c0bdfd889c7ec1f996f86e8854d4bb79.swf"/><br />
</center><br />
How far did you make it??</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/07/frustration-gates-flash-game/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sliding Photo Gallery - Javascript Only</title>
		<link>http://joshmarthaller.com/2009/08/07/sliding-photo-gallery-javascript-only/</link>
		<comments>http://joshmarthaller.com/2009/08/07/sliding-photo-gallery-javascript-only/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:19:08 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=52</guid>
		<description><![CDATA[I made this sliding photo gallery awhile back in javascript.  I wanted something half way fancy to display photos with on my website without using flash. (I HATE flash).  So here is what I ended up with:



That&#8217;s that.  Pretty basic, but it works well and is super easy to use.  I [...]]]></description>
			<content:encoded><![CDATA[<p>I made this sliding photo gallery awhile back in javascript.  I wanted something half way fancy to display photos with on my website without using flash. (I HATE flash).  So here is what I ended up with:</p>
<p><center><br />
<iframe src="http://joshmarthaller.com/demo/jgallery/index2.html" frameborder="0" height="130" width="530" scrolling="no"></iframe><br />
</center></p>
<p>That&#8217;s that.  Pretty basic, but it works well and is super easy to use.  I put up a full size demo here: <a href="http://joshmarthaller.com/demo/jgallery/">jGallery Demo</a>.  You can also download all of the source files here: <a href="http://joshmarthaller.com/files/jgallery.zip">jGallery Source Files</a>.  I&#8217;ve used this in combination with lightbox and left some commented code in the source files to do so.  Play around with it.  You can adjust the speed the images move, how many images are shown, and the images&#8217; size of course.  Have fun and if you use it post a link to your site in the comments here so I can check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/07/sliding-photo-gallery-javascript-only/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Now Anyone Can AJAX</title>
		<link>http://joshmarthaller.com/2009/08/06/now-anyone-can-ajax/</link>
		<comments>http://joshmarthaller.com/2009/08/06/now-anyone-can-ajax/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 01:24:40 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=46</guid>
		<description><![CDATA[I wrote an AJAX function awhile back that I use in a lot of my website projects.  I use it because I prefer it to using an entire javascript library just to get the AJAX functions out of it.  This is incredibly simple and is great for just the basic AJAX applications.  [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote an AJAX function awhile back that I use in a lot of my website projects.  I use it because I prefer it to using an entire javascript library just to get the AJAX functions out of it.  This is incredibly simple and is great for just the basic AJAX applications.  Just about anyone with basic web building skills should be able to implement this into their site for some extra jazz.</p>
<p>I put together a simple demo here: <a href="http://joshmarthaller.com/demo/ajax/">Ajax Demo</a>.  Check it out for basic usage and to get the javascript source code.  You can download the entire demo here: <a href="http://joshmarthaller.com/files/ajax.zip">Ajax Demo Source Files</a>. Upload these file to your server and you&#8217;ll be able to figure out how this works in no time.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/06/now-anyone-can-ajax/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Project iMeetzu.com - Talking To Strangers Online</title>
		<link>http://joshmarthaller.com/2009/08/06/project-imeetzucom-talking-to-strangers-online/</link>
		<comments>http://joshmarthaller.com/2009/08/06/project-imeetzucom-talking-to-strangers-online/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 23:37:41 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=41</guid>
		<description><![CDATA[A couple of weeks ago I built this site iMeetzu.  Basically you just go to the website and click the button to meet a stranger.  There is not much else to it.  You have a few options once you are actually engaged in a conversation with a stranger.  The options are [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I built this site <a href="http://imeetzu.com">iMeetzu</a>.  Basically you just go to the website and click the button to meet a stranger.  There is not much else to it.  You have a few options once you are actually engaged in a conversation with a stranger.  The options are very basic and are as follows:</p>
<ul>
<li><strong>Turns sounds on and off</strong></li>
<li><strong>Change Your Name</strong></li>
<li><strong>Input your Gender</strong></li>
<li><strong>Choose a Gender to Chat With</strong></li>
</ul>
<p>These are just basic options to change the visitors experience. Nothing too complex. I didn&#8217;t want to complicate the site and ruin the entire point of it.</p>
<p>This idea came about from a similar site.  I saw it and was pretty amazed at the simplicity of the idea, but I knew it was not a simple project to build.  I saw some obvious room for new features to make the site better, so I decided to build my own. It didn&#8217;t take as long as I thought.  I build the site from scratch in about a day.</p>
<p>More features will be coming out to make the site even more entertaining.  If you have any ideas please leave them as a comment here and submit them in the feedback form on the iMeetzu website.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/08/06/project-imeetzucom-talking-to-strangers-online/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Image Uploader Script</title>
		<link>http://joshmarthaller.com/2009/05/12/image-uploader-script/</link>
		<comments>http://joshmarthaller.com/2009/05/12/image-uploader-script/#comments</comments>
		<pubDate>Tue, 12 May 2009 17:11:37 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Downloads]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=35</guid>
		<description><![CDATA[I&#8217;ve had quite a few people request this Image Uploader script from me so I took some time today to bundle it up for easy installation.  The script is fairly basic as far as usage goes.  The user just clicks an image and it uploads it.  Upon upload, the image is resized to a web [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had quite a few people request this <a href="/demo/imageUploader">Image Uploader</a> script from me so I took some time today to bundle it up for easy installation.  The script is fairly basic as far as usage goes.  The user just clicks an image and it uploads it.  Upon upload, the image is resized to a web standard size as well as giving them the full size.  All uploaded images for a visit are stored on the left hand side for easy navigation.  Thats about it.</p>
<p>Note: You must have PHP and apache mod-rewrite for this script to work.  Most servers should support this.</p>
<p>Also don&#8217;t forget to chmod 777 the directories listed in the readme file.</p>
<p>If you have any feedback / suggestions please post them in a comment here so I can improve the next release of this script.</p>
<p><a href="/files/uploader.zip">Download the source files here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2009/05/12/image-uploader-script/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Efficient and Flexible Forms With PHP and MySQL</title>
		<link>http://joshmarthaller.com/2008/12/04/efficient-and-flexible-forms-with-php-and-mysql/</link>
		<comments>http://joshmarthaller.com/2008/12/04/efficient-and-flexible-forms-with-php-and-mysql/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 07:59:51 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=24</guid>
		<description><![CDATA[Posting information from a form on your website into a MySQL database is a pretty basic thing, and it is one of the most common functions of any website.  I&#8217;ve had to re-create indentical scripts over and over to accomplish this simple task. So with saving time in mind, I finally just built a &#8216;flexible&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Posting information from a form on your website into a MySQL database is a pretty basic thing, and it is one of the most common functions of any website.  I&#8217;ve had to re-create indentical scripts over and over to accomplish this simple task. So with saving time in mind, I finally just built a &#8216;flexible&#8217; or &#8217;scalable&#8217; method of posting information to the database right from the form.  The idea here is to create some code that will work when I add and remove form fields and not have any effect on the PHP portion of the page.  I&#8217;ll just get right to it&#8230;</p>
<p>All of this would be in a file called addMember.php</p>
<p>Super simple form HTML:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&lt;form action=&#8221;addMember.php&#8221; method=&#8221;post&#8221;&gt;<br />
&lt;table border=&#8221;0&#8243;&gt;<br />
&lt;tbody&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;First Name&lt;/td&gt;<br />
&lt;td&gt;&lt;input name=&#8221;memberFirstName&#8221; size=&#8221;30&#8243; type=&#8221;text&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Last Name&lt;/td&gt;<br />
&lt;td&gt;&lt;input name=&#8221;memberLastName&#8221; size=&#8221;30&#8243; type=&#8221;text&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Phone Number&lt;/td&gt;<br />
&lt;td&gt;&lt;input name=&#8221;memberPhone&#8221; size=&#8221;30&#8243; type=&#8221;text&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Email&lt;/td&gt;<br />
&lt;td&gt;&lt;input name=&#8221;memberEmail&#8221; size=&#8221;30&#8243; type=&#8221;text&#8221; /&gt;&lt;/td&gt;</p>
<p>&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;submit&#8221; name=&#8221;submitMember&#8221; value=&#8221;Add&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;<br />
&lt;/form&gt;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Thats it for the form field&#8217;s HTML. Just a couple of basic fields to collect contact data about a person. Now rather than creating some PHP to specifically map these form fields to the database column names, I am going to do something a bit different.  Check it out:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&lt;?<br />
//This is the code to be called when the form is submitted:<br />
//if the form has been submitted<br />
if(isset($_POST['submitMember']))<br />
{<br />
$keys = array(); //array for form keys<br />
$values = array();//array for the data<br />
$add = array_map(&#8217;mysql_real_escape_string&#8217;,$_POST); //safety first</p>
<p>//loop through each form field submitted in the $_POST array<br />
foreach($add as $k =&gt; $v)<br />
{<br />
//if it is prefixed with &#8216;member&#8217; it needs to be inserted to the database<br />
if(ereg(&#8217;member&#8217;,$k))<br />
{<br />
$keys[] = str_replace(&#8217;member&#8217;,&#8221;,$k);//store the key (form field without &#8216;member&#8217; prefix)<br />
$values[] = &#8220;&#8216;&#8221;.$v.&#8221;&#8216;&#8221;; //store the corresponding data<br />
}//if member<br />
}//for each<br />
//if atleast 1 form field has a &#8216;member&#8217; prefix, store them to the database<br />
if(count($keys)&gt;1)<br />
{<br />
$key = implode(&#8217;,',$keys);//comma separate<br />
$value = implode(&#8217;,',$values);//comma serparate<br />
$sql = &#8220;INSERT INTO `user` (&#8221;.$key.&#8221;) VALUES (&#8221;.$value.&#8221;)&#8221;;<br />
mysql_query($sql) or die(&#8217;Problem Adding User: &#8216; . mysql_error() );<br />
$msg = &#8216;&lt;b&gt;User successfully added to the database&lt;/b&gt;&lt;br /&gt;&#8217;;<br />
}//if count<br />
}//if form submitted<br />
?&gt;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>Note: </strong>I did have this tabbed out very neatly, but it didn&#8217;t appear in the post that way after I saved it, sorry.</p>
<p>What I did here is build an INSERT statement using the form field values as the table column name values, well almost. I prefixed the name of form fields with &#8216;member&#8217; if I want it to be inserted to the database. This allows us to have form fields in the same form that don&#8217;t have to be inserted to the database, but can be used for anything else. The main key here is to match up your column names in the database to the form field names on your form.  So a column in the database named &#8220;Address&#8221; would need to have a form field name of &#8220;memberAddress&#8221; to correctly line up when it comes time to input the data from the form to the database. This is likely a commonly used method of storing data, but I&#8217;ve seen plenty of times where it is not. This little trick will likely save you a lot of time down the road with your form submission scripts. You can almost copy and paste to use it over and over. The only real changes to be made are your table names and some form field names.</p>
<p>And that is it. Nothing too complex here, just a little technique I came up with and thought I&#8217;d share!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2008/12/04/efficient-and-flexible-forms-with-php-and-mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The killer that is web design</title>
		<link>http://joshmarthaller.com/2008/11/18/the-killer-that-is-web-design/</link>
		<comments>http://joshmarthaller.com/2008/11/18/the-killer-that-is-web-design/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 10:28:39 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=16</guid>
		<description><![CDATA[Ah man do I hate trying to design a website.  My brain does not function that way.  I swear I can use the Photoshop tools as good as most professional web designers. But I can&#8217;t put colors and shapes together to form something aesthetically pleasing to save my life. I guess that is what I [...]]]></description>
			<content:encoded><![CDATA[<p>Ah man do I hate trying to design a website.  My brain does not function that way.  I swear I can use the Photoshop tools as good as most professional web designers. But I can&#8217;t put colors and shapes together to form something aesthetically pleasing to save my life. I guess that is what I get for being a programmer by nature, or left brained if you want to call it that? Luckily being a left brained person gives me the skills to make due with the resources out there to put a design together without starting from scratch.</p>
<p>If you are in my position you might want to check out these sites: <a href="http://oswd.org">Open Source Web Design</a> and <a href="http://freecsstemplates.org">Free CSS Templates</a>.  I personally don&#8217;t like using the templates as is. I prefer to use something open source as a base, and modify it into something somewhat unique.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2008/11/18/the-killer-that-is-web-design/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome to my blog</title>
		<link>http://joshmarthaller.com/2008/11/18/welcome/</link>
		<comments>http://joshmarthaller.com/2008/11/18/welcome/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 09:02:29 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
		
		<category><![CDATA[Business]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Random]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[home]]></category>

		<category><![CDATA[josh]]></category>

		<category><![CDATA[new]]></category>

		<category><![CDATA[webmaster]]></category>

		<category><![CDATA[welcome]]></category>

		<guid isPermaLink="false">http://joshmarthaller.com/?p=1</guid>
		<description><![CDATA[Look no further, ya found me.  My name is Josh Marthaller and I&#8217;m a professional web developer. I&#8217;ve been building websites for at least 10 years now.  I put this blog up here to ramble about random topics mostly related to web development, but don&#8217;t be suprised to see some other topics pop up.  My [...]]]></description>
			<content:encoded><![CDATA[<p>Look no further, ya found me.  My name is Josh Marthaller and I&#8217;m a professional web developer. I&#8217;ve been building websites for at least 10 years now.  I put this blog up here to ramble about random topics mostly related to web development, but don&#8217;t be suprised to see some other topics pop up.  My skills are mostly related to programming so you&#8217;ll see a lot of topics about that as well. I&#8217;m also very interested in the business and marketing end of websites, so I&#8217;d say I am a pretty well rounded web developer.</p>
<p>This blog is hosted at: <a href="http://hostamina.com">Hostamina</a> Which is the web hosting company that my friend Aaron and I started in the summer of 2008.  Between the two of us we own too many websites, or projects as I like to call them because they are not complete, yet.</p>
<p>Right now I&#8217;m in my senior year of college at the University of Oregon. I&#8217;m currently an accounting major and CIT minor, but who knows I may change it.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmarthaller.com/2008/11/18/welcome/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

