<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1953154895104809643</id><updated>2011-11-11T12:04:26.177-08:00</updated><category term='firefox'/><category term='div overlay'/><category term='black and white'/><category term='css'/><category term='javascript'/><category term='option default'/><category term='php'/><category term='bookmark'/><category term='opaque'/><category term='select default'/><category term='menu'/><category term='photograph'/><category term='create'/><title type='text'>Random Web Development Topics</title><subtitle type='html'>Sometimes I think of something web development-related and decide to blog it ... hence, random.
&lt;br&gt;&lt;br&gt;
Visit &lt;a href="http://www.peterschlamp.com"&gt;peterschlamp.com&lt;/a&gt; for a more in depth bio.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-3690048166932429802</id><published>2011-11-11T11:22:00.000-08:00</published><updated>2011-11-11T12:04:26.219-08:00</updated><title type='text'>Account Lockout DDoS</title><content type='html'>Webmail with no CAPTCHA + authentication based on Active Directory + strict account lockout policy + publicly available organization email addresses = recipe for a fairly brutal DDoS attack on an organization.&lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;The account lockout denial of service attack is not a new concept. There already exists several white papers describing the dangers of these attacks and possible solutions. But unfortunately the solutions are a bit shortsighted. They describe ways to prevent an "attacker" (read singular) often by blocking her IP address from attempting to log in as a user. They miss the fact that putting together a vicious DDoS attack, using innocent computers as slaves over the web (using multiple IP addresses of the innocent), is but a trivial matter. &lt;br /&gt;&lt;br /&gt;All one needs to do to put together such an attack is place an iframe or several iframes on a popular webpage on any server that points to the target organization's webmail form processor script with a valid user account placed in the user field, with a bad password, and use javascript to submit the form. Every time an innocent person visits the "popular webpage" they are inadvertently submitting the form with a real organization user and bad password (purposely). Because the webpage has high traffic, this in effect will cause the user account to lock out based on the organization's lockout policy (sometimes only after 3 missed attempts within an hour). Now imagine placing 100 iframes on that page all pointing to unique users of that target organization. That would be 100 locked out accounts almost instantly, depending on how many people visit that webpage with the dangerous code placed within. &lt;br /&gt;&lt;br /&gt;Additionally, after the IT department goes in and unlocks the account so the user can work at their desk or check their email, it happens all over again, because the code is still on the webpage working to lock the same user accounts.&lt;br /&gt;&lt;br /&gt;More research should be conducted on how to mitigate this form of attack, especially because it's so easy to pull off. A couple ways to help prevent the problem now would be to prevent publishing organization email addresses that those within organizations would use to log in to their webmail accounts, create aliases that users could log into their account with when their regular account becomes locked out, and possibly the best solution would be to use a good CAPTCHA on their webmail login pages so that this form of automated attack could not easily be accomplished. &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-3690048166932429802?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/3690048166932429802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=3690048166932429802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/3690048166932429802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/3690048166932429802'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2011/11/webmail-with-no-captcha-authentication.html' title='Account Lockout DDoS'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-7744290511864544146</id><published>2011-07-15T13:31:00.000-07:00</published><updated>2011-07-15T13:33:12.093-07:00</updated><title type='text'>Pet euthanasia down from the 70's because of spaying and neutering</title><content type='html'>&lt;a href="http://petmarkdowns.com/the-place-for-pet-lovers-online/blog/pet-euthanasia-down-from-the-70s-because-of-spaying-and-neutering/"&gt;Pet euthanasia down from the 70&amp;#39;s because of spaying and neutering&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-7744290511864544146?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/7744290511864544146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=7744290511864544146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/7744290511864544146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/7744290511864544146'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2011/07/pet-euthanasia-down-from-70s-because-of.html' title='Pet euthanasia down from the 70&apos;s because of spaying and neutering'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-3160226083610851271</id><published>2011-02-25T09:59:00.000-08:00</published><updated>2011-02-25T10:40:56.975-08:00</updated><title type='text'>Excel Concatenation and Auto Fill</title><content type='html'>Often times data that you have to use in your applications comes in Excel sheets but it's not always formatted the way you like it. For example, you might have a column of user ids in your sheet that you need to populate an array in your code, but your array code requires the ids to be quote contained to signify that they are Strings. Concatenation function to the rescue. &lt;br /&gt;&lt;br /&gt;&lt;span class="remainingpost"&gt;Go to an empty column and create your function in the first row. Something like this should do assuming A is your id column: ="'"&amp;A1&amp;"',". What this will do is create an id that looks like this: '454', if 454 is the id in A1. Next, autofill all the rows by placing your mouse in the bottom right corner of the field you just created and when the cross hash appears as your mouse pointer, pull down to auto fill all of your rows. You should notice the fields update automatically. Next, highlight the entire new column, right click on the column and copy to clipboard. Paste your quote encapsulated, comma separated data into a text editor, preferably one like the free Text Wrangler. Why Text Wrangler, well because you will likely need to remove line breaks in the file to work with your array code. Text wrangler has a function to remove all line breaks, in addition it supports regular expressions! Paste your line break free array pieces into your code  and enjoy the rest of your day. Gotta love automation! &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-3160226083610851271?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/3160226083610851271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=3160226083610851271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/3160226083610851271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/3160226083610851271'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2011/02/excel-concatenation-and-auto-fill.html' title='Excel Concatenation and Auto Fill'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-2886188473430265009</id><published>2011-01-27T14:51:00.001-08:00</published><updated>2011-01-27T14:52:08.544-08:00</updated><title type='text'>Obscure your email address from harvesters with Javascript</title><content type='html'>Every string is an array in javascript: &lt;span class="remainingpost"&gt;&lt;br /&gt;var chars="@abcdefghijklmnopqrstuvwxyz.";&lt;br /&gt;email = "peter"+chars[23]+"schlamp"+chars[0]+"gmail"+chars[27]+"com";&lt;br /&gt;alert(email);&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-2886188473430265009?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/2886188473430265009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=2886188473430265009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/2886188473430265009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/2886188473430265009'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2011/01/obscure-your-email-address-from.html' title='Obscure your email address from harvesters with Javascript'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-1556895135462760877</id><published>2010-12-15T11:41:00.000-08:00</published><updated>2010-12-15T12:15:16.387-08:00</updated><title type='text'>Using Javascript to disable the browser back button</title><content type='html'>With the rise of Ajax in web development, a lot of talk has been going on about how to deal with page state-persistence and search engine indexing of Ajax sites. Largely because Google somewhat recently released a &lt;a target='_blank' href="http://code.google.com/web/ajaxcrawling/docs/specification.html"&gt;white paper&lt;/a&gt; on how to create state-persistence and better Ajax indexing, a new procedure for dealing with this has emerged: dynamic URL hashing via Javascript. Facebook and Twitter are a couple of the big boys whom are already using this. It goes a little something like this: upon an Ajax request, a page should use javascript's location.hash property to dynamically change a hash in the page's URL so that the address reflects the new state of the page. For example, if one has a page that dynamically, through Ajax, shows 2 separate views of imagery and another of calendar events, the view that shows imagery should have a hash with the word imagery, while the other view a hash with the word calendar (#calendar). This way, one's Ajax page and Google will "know" the difference between the 2 URLS and correctly represent what needs to be represented.&lt;br /&gt;&lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;I didn't know about the location.hash property until Google's white paper, mostly because I had little reason to use it before Ajax. Besides being useful for Ajax, it can also be used as a browser hack for effectively killing the browser back button. All one needs to do is set this property within a loop, run through it about a hundred times and no more back button (see code below). So far, I've only tested it on Firefox but I'm sure a good portion of the other browsers are affected by this.  &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QjBeL_pgd2w/TQkf7nIhK1I/AAAAAAAAAM0/7twLfkEH2nI/s1600/Screen%2Bshot%2B2010-12-15%2Bat%2B12.06.00%2BPM.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 146px; height: 106px;" src="http://3.bp.blogspot.com/_QjBeL_pgd2w/TQkf7nIhK1I/AAAAAAAAAM0/7twLfkEH2nI/s320/Screen%2Bshot%2B2010-12-15%2Bat%2B12.06.00%2BPM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5551003124688300882" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-1556895135462760877?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/1556895135462760877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=1556895135462760877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1556895135462760877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1556895135462760877'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/12/using-javascript-to-disable-browser.html' title='Using Javascript to disable the browser back button'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_QjBeL_pgd2w/TQkf7nIhK1I/AAAAAAAAAM0/7twLfkEH2nI/s72-c/Screen%2Bshot%2B2010-12-15%2Bat%2B12.06.00%2BPM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-1445855464055606617</id><published>2010-12-06T15:39:00.000-08:00</published><updated>2010-12-06T15:54:31.774-08:00</updated><title type='text'>Shake, Rattle, and Roll in Firefox</title><content type='html'>Firefox's moveBy function in a loop can create some havoc. &lt;span class="remainingpost"&gt;&lt;textarea cols='40' rows='10'&gt;&lt;script&gt;function moveIt(){RandomN = Math.floor(Math.random()*100);negativeRandomN = Math.floor(Math.random()*100) - 99;bina = Math.floor(Math.random()*3);if(bina==1){x=negativeRandomN;y=RandomN;}else{y=negativeRandomN;x=RandomN;}window.moveBy(x,y);}setInterval('moveIt()',50);&lt;/script&gt;&lt;/textarea&gt;&lt;br /&gt;Test the above code out in Firefox and see what happens. Alternatively you can drag this link to your bookmark bar or just click it: &lt;a href="javascript:function moveIt(){RandomN = Math.floor(Math.random()*100);negativeRandomN = Math.floor(Math.random()*100) - 99;bina = Math.floor(Math.random()*3);if(bina==1){x=negativeRandomN;y=RandomN;}else{y=negativeRandomN;x=RandomN;}window.moveBy(x,y);}setInterval('moveIt()',50);void(0);"&gt;Shake It!&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-1445855464055606617?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/1445855464055606617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=1445855464055606617' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1445855464055606617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1445855464055606617'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/12/shake-rattle-and-roll-in-firefox.html' title='Shake, Rattle, and Roll in Firefox'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-4067253528708792520</id><published>2010-10-14T09:24:00.000-07:00</published><updated>2010-10-14T09:44:31.271-07:00</updated><title type='text'>Web development in public spaces - Otis College's lobby displays show work from students and ongoing events around campus.</title><content type='html'>The web page's place has moved beyond its origins. What once used to only exist on our home and work computer monitors, now can be found on mobile devices and on public space displays. &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QjBeL_pgd2w/TLcw_wEMWvI/AAAAAAAAAMs/sX_mM5pW2z8/s1600/image%5B1%5D.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 172px;" src="http://1.bp.blogspot.com/_QjBeL_pgd2w/TLcw_wEMWvI/AAAAAAAAAMs/sX_mM5pW2z8/s320/image%5B1%5D.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5527940939412953842" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;Why use a canned software solution when it's so easy to use HTML to brand your own interface? The hardest part for us in developing this was keeping the data fresh. Otis events are added through the website's content management system, so we needed a way for the lobby display's web interface to access the site's back end database where the event information was held. &lt;br /&gt;&lt;br /&gt;A little Ajax and PHP solves this. The PHP returns a javascript array of event ids from the database that the interface uses to call in information from Otis event URLs. After the system loops through all of the ids in the array, the main interface makes a new Ajax call accessing a replacement array of "fresh" ids thereby keeping the events fresh and alleviating the need for us to "refresh" the page on the display, which would be impossibly cumbersome. &lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-4067253528708792520?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/4067253528708792520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=4067253528708792520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/4067253528708792520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/4067253528708792520'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/10/web-development-in-public-spaces-otis.html' title='Web development in public spaces - Otis College&apos;s lobby displays show work from students and ongoing events around campus.'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_QjBeL_pgd2w/TLcw_wEMWvI/AAAAAAAAAMs/sX_mM5pW2z8/s72-c/image%5B1%5D.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-934634139222347998</id><published>2010-10-03T16:33:00.001-07:00</published><updated>2010-10-03T16:35:16.775-07:00</updated><title type='text'>What's Nearby. Web app for your mobile.</title><content type='html'>Test this on your mobile. &lt;span class="remainingpost"&gt;&lt;a href="http://www.peterschlamp.com/nearby.php?w=90049&amp;t=pizza"&gt;Nearby&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-934634139222347998?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/934634139222347998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=934634139222347998' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/934634139222347998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/934634139222347998'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/10/whats-nearby-web-app-for-your-mobile.html' title='What&apos;s Nearby. Web app for your mobile.'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-3982166371521142533</id><published>2010-09-09T14:53:00.000-07:00</published><updated>2010-09-10T09:22:30.582-07:00</updated><title type='text'>Long URL Bookmarklet</title><content type='html'>Long URL Bookmarklet expands those short URLs so that you can see where you're really headed when clicking on those links &lt;span class="remainingpost"&gt;&lt;br /&gt;&lt;br /&gt;Drag this link to your Firefox toolbar: &lt;a href="javascript:shorturl=prompt('Enter%20the%20short%20URL%20here','Enter%20the%20short%20URL%20here');if(shorturl != null){document.location='http://peterschlamp.com/php/wheresitpoint.php?u='+shorturl;}else{void(0)}"&gt;Long URL&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-3982166371521142533?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/3982166371521142533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=3982166371521142533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/3982166371521142533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/3982166371521142533'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/09/long-url-bookmarklet-expands-those.html' title='Long URL Bookmarklet'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-1483797103638452194</id><published>2010-07-22T10:54:00.000-07:00</published><updated>2010-07-22T11:09:13.180-07:00</updated><title type='text'>Speed up processing your code with Word's marquee function</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QjBeL_pgd2w/TEiGbLEWmTI/AAAAAAAAAMQ/rasSpTUsuss/s1600/Screen+shot+2010-07-22+at+10.56.29+AM.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 208px; height: 320px;" src="http://1.bp.blogspot.com/_QjBeL_pgd2w/TEiGbLEWmTI/AAAAAAAAAMQ/rasSpTUsuss/s320/Screen+shot+2010-07-22+at+10.56.29+AM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5496791146591328562" /&gt;&lt;/a&gt;&lt;br /&gt;Marquee parts of text lines with MS Word &lt;span class="remainingpost"&gt;On a Mac, Command+Option allows you to select a portion of multiple lines. Say you need to just grab the variable names from this list, well all you would need to do is press command+option, highlight the left side of the code where the variable names are, then copy to clipboard. This drastically speeds up code processing by alleviating the need to type the variables or to backspace each line.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-1483797103638452194?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/1483797103638452194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=1483797103638452194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1483797103638452194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1483797103638452194'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/07/marquee-parts-of-text-lines-with-ms.html' title='Speed up processing your code with Word&apos;s marquee function'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_QjBeL_pgd2w/TEiGbLEWmTI/AAAAAAAAAMQ/rasSpTUsuss/s72-c/Screen+shot+2010-07-22+at+10.56.29+AM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-6211750141103023411</id><published>2010-05-15T07:09:00.000-07:00</published><updated>2010-05-18T10:19:21.403-07:00</updated><title type='text'>Table To Chart</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_QjBeL_pgd2w/S-6uCqNDHII/AAAAAAAAAL0/Xs9fwTgn8Hc/s1600/Screen+shot+2010-05-15+at+7.21.03+AM.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 275px; height: 320px;" src="http://2.bp.blogspot.com/_QjBeL_pgd2w/S-6uCqNDHII/AAAAAAAAAL0/Xs9fwTgn8Hc/s320/Screen+shot+2010-05-15+at+7.21.03+AM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5471501958013721730" /&gt;&lt;/a&gt;&lt;br /&gt;Create a HTML table and get a Google Chart. &lt;span class="remainingpost"&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I really like the Interactive Charts API that Google offers http://code.google.com/apis/charttools/ but I wanted to devise a way of creating these charts simply by creating a HTML table for those less inclined to using complex JavaScript. An example of the main function call is drawChart('columnchart','chartme','chart_div','Things I Do',600,400); It works with these charts for now: as first function parameter-"linechart","piechart","areachart","columnchart","barchart","gauge". 2nd parameter is the table id, 3rd is the element id that you would like your chart to appear, 4th parameter is the title of your chart, 5th and 6th are width and height respectively. All are necessary for the chart to function properly. You can &lt;a href="http://peterschlamp.com/js/tabletochart.js"&gt;download tabletochart.js here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Dependencies: You must include Google's JSAPI library http://www.google.com/jsapi , Jquery - if you don't have it on your site, all you have to do is uncomment the line that reads "google.load("jquery", "1.4.1");" and it will add it for you. Of course, you will need tabletochart.js available for download above. Also when creating your HTML table, you must have TH tags in your first row. The code that runs behind the scenes will use the data within these tags in your chart. In addition to TH tags you should wrap all rows within your table inside of TBODY tags.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Feel free to use drawchart.js in your code, I just ask that you don't hotlink directly to it from your site. Let me know if you've got questions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;View the source on this page: &lt;a href="http://peterschlamp.com/js/drawcharttest.html"&gt;http://peterschlamp.com/js/drawcharttest.html&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-6211750141103023411?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/6211750141103023411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=6211750141103023411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6211750141103023411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6211750141103023411'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/05/table-to-chart.html' title='Table To Chart'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_QjBeL_pgd2w/S-6uCqNDHII/AAAAAAAAAL0/Xs9fwTgn8Hc/s72-c/Screen+shot+2010-05-15+at+7.21.03+AM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-7396302626052081566</id><published>2010-03-05T08:53:00.000-08:00</published><updated>2010-03-05T09:17:10.336-08:00</updated><title type='text'></title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_QjBeL_pgd2w/S5E8kPJWSQI/AAAAAAAAALk/jeKg3ioA60g/s1600-h/json_xml_travel_mug-p1686200454054833122l99x_400.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 320px;" src="http://2.bp.blogspot.com/_QjBeL_pgd2w/S5E8kPJWSQI/AAAAAAAAALk/jeKg3ioA60g/s320/json_xml_travel_mug-p1686200454054833122l99x_400.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5445200017706338562" /&gt;&lt;/a&gt;&lt;br /&gt;Ever wish you had instant access to a XML feed, but in JSON format? Well wish no longer. I wrote a web service for that. Example usage: http://www.peterschlamp.com/php/xmltojson.php?xml=http://peterwschlamp.blogspot.com/feeds/posts/default?alt=rss&lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;Just add any XML file on the net to the xml parameter in the above URL and you'll get an on the fly JSON formatted file for you to use via Javascript. This works great with syndications like Atom or RSS, which may not have a related JSON format. Here's an example I'm using for the RSS feed of my blog: &lt;a href="http://www.peterschlamp.com/php/testjson.html"&gt;http://www.peterschlamp.com/php/testjson.html&lt;/a&gt;. I used Jquery's getjson function to parse the RSS feed into it's titles and related links. Give it a try yourself.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-7396302626052081566?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/7396302626052081566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=7396302626052081566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/7396302626052081566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/7396302626052081566'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/03/ever-wish-you-had-instant-access-to-xml.html' title=''/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_QjBeL_pgd2w/S5E8kPJWSQI/AAAAAAAAALk/jeKg3ioA60g/s72-c/json_xml_travel_mug-p1686200454054833122l99x_400.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-6232955167891487329</id><published>2010-03-04T13:09:00.000-08:00</published><updated>2010-03-04T13:46:26.430-08:00</updated><title type='text'>Security: Cross-site request forgery</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QjBeL_pgd2w/S5AqKb1VcMI/AAAAAAAAALY/MfEUzrtWlVw/s1600-h/3-csrf-schem.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 257px;" src="http://1.bp.blogspot.com/_QjBeL_pgd2w/S5AqKb1VcMI/AAAAAAAAALY/MfEUzrtWlVw/s320/3-csrf-schem.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5444898308249448642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If I was a hacker, one of my favorite forms of web applications hacking would be through cross-site request forgery. CSRF is a form of web site exploitation in which unauthorized commands are transmitted from a user that the website trusts. It's easy to do and gives a hacker all the privileges of the trusted user whom he's acting as.  &lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;One very simple example would be a known but very innocuous exploit on Gmail's log out function. &lt;a href="https://mail.google.com/mail/?logout&amp;hl=en"&gt;Log me out of Gmail&lt;/a&gt; Clicking this link would log you out of Gmail from my blog, which shouldn't be allowed by Google but is. The above is simple because it's in the form of a link, which uses GET variables as it's parameters. Actually Gmail's logout function is so simple that it doesn't even use parameters in it's link. Many developers  mistakenly believe that as long as their forms use POST that they don't have a problem with CSRF.&lt;br /&gt;&lt;br /&gt;A more complex example but still very easy exploit would be to place a copy and pasted bank's POST form that would be hidden through some simple CSS on the hacker's site. The hacker would have to trick a bank user who is logged in to the bank's website to navigate their browser over to the hacker's malicious page with the hidden form, at which point some javascript would click submit on the form, which could transfer money from the victim's account over to the hacker's. The hacker would copy and paste the form onto his site and place whatever data he wanted into the inputs of the form before it's submitted by the javascript. This is possible because the hacker is acting as the trusted user of the bank's website. Of course most if not all banks have long ago safeguarded themselves from this form of attack, but I know for a fact that many other sites have not. &lt;br /&gt;&lt;br /&gt;The best form of prevention is to use tokens in hidden inputs of your forms. The token should be a randomly generated number made specifically for that user. This way the hacker would have to know what the user's token is, which is pretty much impossible. Any form when submitted as that user must have that exact token value as one of the variables with each request. An easy solution to a very common problem. &lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-6232955167891487329?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/6232955167891487329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=6232955167891487329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6232955167891487329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6232955167891487329'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/03/security-cross-site-request-forgery.html' title='Security: Cross-site request forgery'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_QjBeL_pgd2w/S5AqKb1VcMI/AAAAAAAAALY/MfEUzrtWlVw/s72-c/3-csrf-schem.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-8389039822240711785</id><published>2010-03-02T15:09:00.000-08:00</published><updated>2010-03-02T15:28:30.214-08:00</updated><title type='text'>Luke Wroblewski and the importance of quality web forms.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QjBeL_pgd2w/S42fFhbVdFI/AAAAAAAAAKs/CYi9uwU0IT4/s1600-h/Picture+1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 162px;" src="http://3.bp.blogspot.com/_QjBeL_pgd2w/S42fFhbVdFI/AAAAAAAAAKs/CYi9uwU0IT4/s320/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5444182441781982290" /&gt;&lt;/a&gt;&lt;br /&gt;Probably the most important element of web development in this day of e-commerce and information exchange is good Web Form design. And Luke Wroblewski has likely studied it more than anyone else. &lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;Luke discusses layout design, validation methods and emphasizes gradual engagement. This 74 min video is definitely worth watching for anyone seeking better user navigability and higher conversion rates:  &lt;a href="http://www.lukew.com/presos/preso.asp?8"&gt;http://www.lukew.com/presos/preso.asp?8&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-8389039822240711785?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/8389039822240711785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=8389039822240711785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8389039822240711785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8389039822240711785'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2010/03/probably-most-important-element-of-web.html' title='Luke Wroblewski and the importance of quality web forms.'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_QjBeL_pgd2w/S42fFhbVdFI/AAAAAAAAAKs/CYi9uwU0IT4/s72-c/Picture+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-6466934135123461997</id><published>2009-04-28T11:40:00.000-07:00</published><updated>2009-04-28T11:46:23.526-07:00</updated><title type='text'>Using PHP's List construct makes referencing database variables much faster</title><content type='html'>PHP's list language construct basically assigns a number of variables to the pieces of an array all in one line of code. This helps speed up a lot of things but particularly assigning variables to your database return.&lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;From PHP.net:&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;$result = mysql_query("SELECT id, name, salary FROM employees", $conn);&lt;br /&gt;while (list($id, $name, $salary) = mysql_fetch_row($result)) {&lt;br /&gt;    echo " &lt;tr&gt;\n" .&lt;br /&gt;          "  &lt;td&gt;&lt;a href=\"info.php?id=$id\"&gt;$name&lt;/a&gt;&lt;/td&gt;\n" .&lt;br /&gt;          "  &lt;td&gt;$salary&lt;/td&gt;\n" .&lt;br /&gt;          " &lt;/tr&gt;\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;Notice that the code assigns $id, $name, and $salary to the individual pieces of the $result array that is returned by the mysql_fetch_row function. In this case you would be turning 3 extra lines of code into 1. Yes small fries here, but often times, you would be returning at least 10 fields from your DB.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-6466934135123461997?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/6466934135123461997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=6466934135123461997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6466934135123461997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6466934135123461997'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2009/04/using-phps-list-construct-maked.html' title='Using PHP&apos;s List construct makes referencing database variables much faster'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-2967886692136521382</id><published>2009-04-20T10:37:00.000-07:00</published><updated>2009-05-02T15:22:23.546-07:00</updated><title type='text'>Security: Public Computer Bait Phishing for user credentials</title><content type='html'>Here is a vector of attack that one can use to obtain the username and password of an individual at many organizations on a public computer.&lt;br /&gt;&lt;br /&gt;Say you're an evil hacker on a public computer in a university library or something and want to get access to a student's login credentials. A hacker might want the credentials to gain access to the protected WiFi access of the college or worse. He can do so with local javascript injection and a server script that will receive the info.&lt;br /&gt; &lt;br /&gt;&lt;span class="remainingpost"&gt;&lt;br /&gt;Here's example code that alerts out yahoo email credentials:&lt;br /&gt;javascript:document.getElementsByName('login_form')[0].onsubmit=function(){alert(document.getElementById('username').value + " " + document.getElementById('passwd').value);return false;};void(0);&lt;br /&gt;Just go to the Yahoo mail page place above code in address and hit enter, then fill in your login/password, finally submit form. Notice alert box with credentials will show.&lt;br /&gt;&lt;br /&gt;Let's pretend here that yahoo mail is really the webmail page for the university that you are trying to hack credentials for. By navigating on the public computer to Yahoo's email login page, injecting this particular javascript into it, and clearing out the address so it doesn't look suspicious one can gain access to a user's credentials. &lt;br /&gt;&lt;br /&gt;What one would do is 1st - the above steps. But instead of using an alert box (used only as proof of concept) one would send those values to an external server (his server), preferably to his database for safe keeping. As mentioned before, be sure to clear out the address of the suspicious javascript. Replace it with, in this case, "http://mail.yahoo.com/", then walk away from said public computer leaving the injected page on the screen as bait for our victim. The best way to do this would be to create with javascript a hidden IFrame to do all the dirty work in the background and allow the form to submit afterward so that the user doesn't notice anything wrong.&lt;br /&gt;&lt;br /&gt;I don't endorse this, but am merely documenting this as a vector of attack. Administrators should take note of this and use any form of prevention possible.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-2967886692136521382?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/2967886692136521382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=2967886692136521382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/2967886692136521382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/2967886692136521382'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2009/04/hacking-public-computer-for-username.html' title='Security: Public Computer Bait Phishing for user credentials'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-8016381364985513712</id><published>2008-03-25T13:14:00.001-07:00</published><updated>2008-03-25T13:20:53.009-07:00</updated><title type='text'>Polymorphism in PHP 5+</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_QjBeL_pgd2w/R-ldiHe-ZyI/AAAAAAAAADE/TLBFbATPHkg/s1600-h/Picture+1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_QjBeL_pgd2w/R-ldiHe-ZyI/AAAAAAAAADE/TLBFbATPHkg/s400/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5181775686972368674" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click the above code image to see it larger. In the code, the Animal parameter is an interface for both the Dog and Cat classes. Dog and Cat both return woof and meow respectively. &lt;br /&gt;&lt;br /&gt;The "magic" of polymorphism is found in the function. It accepts a class of type Animal. It then attempts to figure out which type of Animal it is, just to be sure it exists. Finally, it outputs what's returned by the Dog and Cat's makeSound functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-8016381364985513712?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/8016381364985513712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=8016381364985513712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8016381364985513712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8016381364985513712'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/03/polymorphism-in-php-5.html' title='Polymorphism in PHP 5+'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_QjBeL_pgd2w/R-ldiHe-ZyI/AAAAAAAAADE/TLBFbATPHkg/s72-c/Picture+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-8634536364430520572</id><published>2008-02-15T11:12:00.001-08:00</published><updated>2010-03-02T15:24:43.142-08:00</updated><title type='text'>The ternary operator instead of basic if-then statements for quicker more efficient coding</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_QjBeL_pgd2w/R7XkbpvwnQI/AAAAAAAAAC8/bTzA6krhr-k/s1600-h/Picture+1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_QjBeL_pgd2w/R7XkbpvwnQI/AAAAAAAAAC8/bTzA6krhr-k/s400/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5167287311191284994" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, the ternary operator greatly reduces the amount of code in your file.&lt;br /&gt;&lt;br /&gt;The second php block shows that you can turn 5 lines of code into 1. With the ternary operator, the if keyword is implied with just the use of parentheses. The question mark is used for the keyword then (or } in php) and the colon is used for the "else".&lt;br /&gt;&lt;br /&gt;Here, the code will echo out either hello world or this is some other page depending on what the server variable is holding.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-8634536364430520572?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/8634536364430520572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=8634536364430520572' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8634536364430520572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8634536364430520572'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/02/get-used-to-using-ternary-operator.html' title='The ternary operator instead of basic if-then statements for quicker more efficient coding'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_QjBeL_pgd2w/R7XkbpvwnQI/AAAAAAAAAC8/bTzA6krhr-k/s72-c/Picture+1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-2423826579781489831</id><published>2008-02-12T14:53:00.000-08:00</published><updated>2008-02-12T15:08:58.551-08:00</updated><title type='text'>AJAX - A simple demonstratin with code</title><content type='html'>&lt;a href="http://petmarkdowns.com/AJAXclassTester.htm"&gt;http://petmarkdowns.com/AJAXclassTester.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-2423826579781489831?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/2423826579781489831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=2423826579781489831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/2423826579781489831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/2423826579781489831'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/02/ajax-simple-demonstratin-with-code.html' title='AJAX - A simple demonstratin with code'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-8010258704779851989</id><published>2008-02-12T14:22:00.000-08:00</published><updated>2008-02-12T14:44:35.944-08:00</updated><title type='text'>Friendly URLs with Apache and .htaccess Files</title><content type='html'>Want to change those ugly parameter-filled PHP URLs to more user and search engine-friendly links. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_QjBeL_pgd2w/R7Ig9ZvwnPI/AAAAAAAAAC0/2z-GvW7MwDo/s1600-h/Picture+1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_QjBeL_pgd2w/R7Ig9ZvwnPI/AAAAAAAAAC0/2z-GvW7MwDo/s400/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5166227961802693874" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Give it a try. Alternatively one could use mod_rewrite but this way is much easier especially for those who host on servers that give little access rights.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-8010258704779851989?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/8010258704779851989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=8010258704779851989' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8010258704779851989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/8010258704779851989'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/02/friendly-urls-with-apache-and-htaccess.html' title='Friendly URLs with Apache and .htaccess Files'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_QjBeL_pgd2w/R7Ig9ZvwnPI/AAAAAAAAAC0/2z-GvW7MwDo/s72-c/Picture+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-7645753061018632048</id><published>2008-01-25T12:50:00.000-08:00</published><updated>2008-01-25T12:57:09.418-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opaque'/><category scheme='http://www.blogger.com/atom/ns#' term='photograph'/><category scheme='http://www.blogger.com/atom/ns#' term='black and white'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>More fun with opacity: Opaque over black and white photos</title><content type='html'>I love how an opaque foreground looks when it overlays a black and white photo. Check out how mine looks: &lt;a href="http://www.geocities.com/peterwschlamp/blackwhiteopaquetest.html"&gt;http://www.geocities.com/peterwschlamp/blackwhiteopaquetest.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's so easy to do too! All it takes is some CSS. Feel free to check out the source while you're there to see how it's done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-7645753061018632048?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/7645753061018632048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=7645753061018632048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/7645753061018632048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/7645753061018632048'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/01/more-fun-with-opacity-opaque-over-black.html' title='More fun with opacity: Opaque over black and white photos'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-1683953261586285260</id><published>2008-01-25T11:32:00.001-08:00</published><updated>2008-01-25T11:38:12.239-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='menu'/><title type='text'>Make your own CSS Javascript menu!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_QjBeL_pgd2w/R5o5XmnKylI/AAAAAAAAACs/uke_uCr35hg/s1600-h/Picture+3.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_QjBeL_pgd2w/R5o5XmnKylI/AAAAAAAAACs/uke_uCr35hg/s400/Picture+3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5159499400770931282" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Making your own Javascript menus isn't as hard as you may think. Look at how simple the code can be. Basic CSS sets up the color and font of the actual menu and some simple inline Javascript either hides or shows the menu depending on where the mouse's location is on the screen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-1683953261586285260?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/1683953261586285260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=1683953261586285260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1683953261586285260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1683953261586285260'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/01/make-your-own-css-javascript-menu.html' title='Make your own CSS Javascript menu!'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_QjBeL_pgd2w/R5o5XmnKylI/AAAAAAAAACs/uke_uCr35hg/s72-c/Picture+3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-6190898797156236783</id><published>2008-01-24T10:27:00.001-08:00</published><updated>2008-01-24T10:57:56.926-08:00</updated><title type='text'>Use PHP and Javascript together for easier PHP debugging</title><content type='html'>A nice way to test for LOGICAL bug positions (obviously not syntactical) in your PHP scripts is to place a Javascript alert box in those questionable places. Because PHP has no built in alert box method, Javascript can really come in handy for this.&lt;br /&gt;&lt;br /&gt;Here's the code:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_QjBeL_pgd2w/R5jdGWnKykI/AAAAAAAAACk/TtLSYHsYiUI/s1600-h/Picture+1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_QjBeL_pgd2w/R5jdGWnKykI/AAAAAAAAACk/TtLSYHsYiUI/s400/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5159116474371721794" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You would apply this incrementally into your code until it doesn't any longer appear. If your Javascript alert box pops up but things don't function properly after the alert then you know that your bug resides somewhere after your placement (usually very close) of this line of code. &lt;br /&gt;&lt;br /&gt;Obviously, you can use your alert box for other things too. Have fun with it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-6190898797156236783?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/6190898797156236783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=6190898797156236783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6190898797156236783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6190898797156236783'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/01/use-php-and-javascript-together-for.html' title='Use PHP and Javascript together for easier PHP debugging'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_QjBeL_pgd2w/R5jdGWnKykI/AAAAAAAAACk/TtLSYHsYiUI/s72-c/Picture+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-5983976901692781662</id><published>2008-01-21T09:16:00.000-08:00</published><updated>2008-01-21T09:34:27.888-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmark'/><category scheme='http://www.blogger.com/atom/ns#' term='create'/><title type='text'>Make Your Own Javascript Firefox  Bookmark that Works with Almost All the Websites that You Visit</title><content type='html'>I like to watch movies and other videos on the internet. Like Youtube, these videos typically stream over a flash or quicktime player. What I find annoying sometimes is that there is usually a blinding white background page behind the player that usually takes away from the movie-watching experience.&lt;br /&gt;&lt;br /&gt;Well, now you can control the color of your background on pretty much any website with a little javascript experience.&lt;br /&gt;&lt;br /&gt;In order to create a clickable bookmark in firefox you have to first create a javascript link and then drag that link up to your firefox toolbar. &lt;br /&gt;&lt;br /&gt;Here is the javascript link that I created to use for darkening white backgrounds for my movies: &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_QjBeL_pgd2w/R5TWNUuKxFI/AAAAAAAAABo/h8QZ-gFzZEw/s1600-h/untitled.GIF"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_QjBeL_pgd2w/R5TWNUuKxFI/AAAAAAAAABo/h8QZ-gFzZEw/s400/untitled.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5157982997635056722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Just slap that code in a link and after the link is on a page, simply drag that link up onto your firefox toolbar and wala! Now evertime you click that bookmark, you will see the background color of the site you're on turn to black.&lt;br /&gt;&lt;br /&gt;Try tweeking the code to your own needs.&lt;br /&gt;&lt;br /&gt;Example of my link. Just drag this link to your Firefox toolbar and try clicking it: &lt;a href="javascript:document.getElementsByTagName('BODY').item(0).setAttribute('style','background-color:black;');"&gt;Darken This Background&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-5983976901692781662?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/5983976901692781662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=5983976901692781662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/5983976901692781662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/5983976901692781662'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/01/make-your-own-javascript-firefox.html' title='Make Your Own Javascript Firefox  Bookmark that Works with Almost All the Websites that You Visit'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_QjBeL_pgd2w/R5TWNUuKxFI/AAAAAAAAABo/h8QZ-gFzZEw/s72-c/untitled.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-6697519868470886958</id><published>2008-01-19T18:43:00.000-08:00</published><updated>2008-01-19T18:55:16.161-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='opaque'/><category scheme='http://www.blogger.com/atom/ns#' term='div overlay'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Want to do an extremely simple opaque div overlay?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_QjBeL_pgd2w/R5K2GUuKxEI/AAAAAAAAABg/YmPO3hBEW0o/s1600-h/untitled.GIF"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_QjBeL_pgd2w/R5K2GUuKxEI/AAAAAAAAABg/YmPO3hBEW0o/s400/untitled.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5157384743050462274" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Check out how simple the code can be. It starts out as invisible then if the link is clicked, the div shows up taking up the whole screen in all its opaque glory. If the div's clicked, it will disappear leaving you with your link again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-6697519868470886958?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/6697519868470886958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=6697519868470886958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6697519868470886958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/6697519868470886958'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/01/want-to-do-extremely-simple-opaque-div.html' title='Want to do an extremely simple opaque div overlay?'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_QjBeL_pgd2w/R5K2GUuKxEI/AAAAAAAAABg/YmPO3hBEW0o/s72-c/untitled.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953154895104809643.post-1954615055864390402</id><published>2008-01-18T21:04:00.000-08:00</published><updated>2008-01-19T07:57:28.186-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='select default'/><category scheme='http://www.blogger.com/atom/ns#' term='option default'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Getting those Select-Option HTML Form Inputs to have defaults depending on form submission with PHP</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_QjBeL_pgd2w/R5IbxUuKxCI/AAAAAAAAABQ/dyQ49TBELUE/s1600-h/untitled.GIF"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_QjBeL_pgd2w/R5IbxUuKxCI/AAAAAAAAABQ/dyQ49TBELUE/s400/untitled.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5157215057482531874" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Wow, what a horrible title. Anyway, I wanted to add this post for those of you who are interested in adding defaults to select option form inputs depending on what the user originally set in the form.&lt;br /&gt;&lt;br /&gt;For example, Joe goes over to your form and selects 'male' for his gender in your form and after he submits it, you want to show him what exactly he chose for gender on the next page within another select option form input.&lt;br /&gt;&lt;br /&gt;Well with HTML you have to use the 'selected' attribute within the particular 'male' option as opposed to female in Joe's case. The selected attribute adds a couple degrees of complexity over that of a basic text box that you would simply add to the value attribute.&lt;br /&gt;&lt;br /&gt;Check out the code above for a similar example this time using yes/no as values as opposed to gender. If you have even a little PHP experience, it should be a breeze to understand.&lt;br /&gt;&lt;br /&gt;Thanks to Matthew Ballard for this one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953154895104809643-1954615055864390402?l=peterwschlamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://peterwschlamp.blogspot.com/feeds/1954615055864390402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953154895104809643&amp;postID=1954615055864390402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1954615055864390402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953154895104809643/posts/default/1954615055864390402'/><link rel='alternate' type='text/html' href='http://peterwschlamp.blogspot.com/2008/01/getting-those-select-option-html-form.html' title='Getting those Select-Option HTML Form Inputs to have defaults depending on form submission with PHP'/><author><name>peterwschlamp</name><uri>http://www.blogger.com/profile/11965143820671164549</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_QjBeL_pgd2w/S42feOZqs0I/AAAAAAAAAK0/Vb7kEhxqGgQ/S220/Photo+4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_QjBeL_pgd2w/R5IbxUuKxCI/AAAAAAAAABQ/dyQ49TBELUE/s72-c/untitled.GIF' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
