Wednesday, January 9, 2013

Must Know- Php Developers

1. Use PHP Core Functions and Classes
If you’re trying to do something that seems fairly common, chances are, there’s already a PHP function or class that you can take advantage of. Always check out thePHP manual before creating your own functions. There’s no need to create a function to remove the white space at the beginning and at the end of a string when you can just use the trim() function. Why build an XML parser for RSS feeds when you can take advantage of PHP’s XML Parser functions (such as xml_parse_into_struct)?
2. Create a Configuration File
Instead of having your database connection settings scattered everywhere, why not just create one master file that contains its settings, and then include it in your PHP scripts? If you need to change details later on, you can do it in one file instead of several files. This is also very useful when you need to use other constants and functions throughout multiple scripts.
Using a config file is a popular web application pattern that makes your code more modular and easier to maintain.
3. Always Sanitize Data That Will Go into Your Database
SQL injections are more common that you may think, and unless you want a big headache later on, sanitizing your database inputs is the only way to get rid of the problem. The first thing you should do is learn about popular ways your app can be compromised and get a good understanding of what SQL injections are; read about examples of SQL injection attacks and check out this SQL injection cheat sheet.
Luckily, there’s a PHP function that can help make a big heap of the problem go away:mysql_real_escape_string. mysql_real_escape_string will take a regular string (learn about data types through this PHP variables guide) and sanitize it for you. If you use the function together with htmlspecialchars, which converts reserved HTML characters (like <script> becomes &lt;script&gt;), not only will your database be protected, but you’ll also safeguard your app against cross-site scripting (XSS) attacks when rendering user-submitted HTML (such as those posted in comments or forum threads).
4. Leave Error Reporting Turned On in Development Stage
Looking at the PHP White Screen of Death is never helpful except for knowing something is definitely wrong. When building your application, leave error_reportingand display_errors turned on to see run-time errors that will help you quickly identify where errors are coming from.
You can set up these run-time configurations in your server’s php.ini file or, if you don’t have access to override the directives in this file, set them on top of your PHP scripts (using the ini_set() function to set display_errors to 1, but it has its limitations when done this way).
The reason behind turning on error reporting is quite simple — the sooner you know about your errors, the faster you can fix them. You might not care about the warning messages that PHP might give you, but even those usually signal towards a memory-related issue that you can take care of. When you’re done building out your application, turn error_reporting and display_errors off or set their values to a production-ready level.
5. Don’t Over-Comment Your Code
Proper documentation of your code through comments in your scripts is definitely a good practice, but is it really necessary to comment every single line? Probably not. Comment the complicated parts of your source code so that when you revisit it later you’ll quickly remember what’s going, but don’t comment simple things such as your MySQL connection code. Good code is self-explanatory most of the time.
Good Example of Commenting


  $hostname = "localhost";
  $username = "";
  $password = "";
  $dbname = "";

  $connectionStatus = mysql_connect($hostname, $username, $password) or die(mysql_error());
  $selectionStatus = mysql_select_db($dbname) or die(mysql_error());


Bad Example of Commenting

  $hostname = "localhost"; // Hostname
  $username = ""; // Username
  $password = ""; // Password
  $dbname = ""; // Database name
  // Connect to the database or display an error
  $connectionStatus = mysql_connect($hostname, $username, $password) or die(mysql_error());
    // Select our database here    
    $selectionStatus = mysql_select_db($dbname) or die(mysql_error());

6. Keep Favorite Code Snippets Handy
You’ll be coding a lot of the same things throughout your PHP development career, and keeping code snippets always available will help you save a lot of time. There are several apps that can keep and sync your code snippet collection for you, so no matter where you are, you can always have your snippets available. Some apps you can use to corral your code snippets are Snippet, snippely, Code Collector, and Snipplr(web-based).
Most integrated development environments (IDEs) such as Eclipse (which can store code templates) and Dreamweaver (via the Snippets Panel) may have built-in features for storing code snippets.
Even a simple and well-organized directory called snippets that contain text files (or PHP scripts) — and possibly synced in the cloud using an app like Dropbox if you use multiple computers — can do the trick.
7. Use a Good Source Editor to Save You Time
Your editor is where you’ll spend the majority of your time, so you want to use something that helps you save time. Syntax highlighting is a must and definitely something you should be looking for as a software feature. Other bonuses include code hinting, code navigation and built-in debugging tools. All of these features can end up saving you massive amounts of time. An example of a source code editor/IDE for PHP is phpDesigner.
Take the time to get familiar with your source code editor’s features by reading the documentation and reading tutorials online. A bit of time investment in this arena can really streamline your coding workflow.
Check out this list of source code editors for developers as well as this list of free text editors for coders to discover popular code-editing applications.
8. Use a MySQL Administration Tool (Like phpMyAdmin)
I know some crazy hard-core developers who like working with MySQL (the popularDatabase Management System pairing for PHP) via command line, which, to me, is inefficient and just, well, crazy. It’s a good thing to know how to administer your MySQL database using mysqladmin, but afterwards, you should use a graphical user interface like phpMyAdmin to speed up database development and administration.
Use a Good Source Editor to Save You Time
phpMyAdmin, in particular, is an excellent open source database viewer/manager that allows you to view your MySQL databases graphically so that you don’t have to waste time doing things via the command line. You can quickly build databases and their tables, export your databases into SQL files, run SQL queries, optimize tables, check for issues, create MySQL database users and set up their privileges quickly, and much more. There is a good chance your web host already has phpMyAdmin installed, and if not, it only takes minutes to install.
Check out this list of the best MySQL database management tools and this list ofMySQL apps for alternatives to phpMyAdmin.
9. Use a PHP Framework
It took me a really long time to accept the fact that using a web application development/rapid application development framework would help me out. You have a small learning curve in the beginning, and there will be a lot of reading to do to learn how the API of the framework works, but you get amazing productivity and efficiency benefits later. Using a framework forces you to use better web development patterns that you might not be using right now.
Using a PHP framework pays off big time when you have to share your code with others later on or when you have to work together with someone; it gives you a standardized platform for building web applications. I learned the importance of this the hard way when I had to start hiring other developers.
Some popular PHP frameworks are CakePHP, CodeIgniter, symfony, and Zend.
10. Connect with Other PHP Developers
You don’t know it all. And even if you think you do, there are thousands of others out there that know how to do something better than you do. Join a PHP community likePHPDeveloper and interact with others. By connecting with other developers, you’ll learn better ways of doing the things you’re currently doing.
 Many thanks:

Wednesday, December 5, 2012

5 things an e- commerce site "Must Have"

If you own a small business but don’t actually sell products on your website, you need to pay ATTENTION!!!. For retail and restaurant websites, these are some of the features that your site MUST contain, but many sites miss some or all of IT. For retail and restaurant websites, these are some of the features that your site MUST contain, but many sites miss some or all of these, or they’re too hard to find to be effective.
Even if your website consists of only a single page, make sure that it has no less than the following, in no particular order.

Store hours
Telephone number
Street address of all locations
A list of products and brands that you carry
Specials, sales, and web coupons

1. Store Hours

Make sure that your site clearly lists the standard operating hours and holiday scheduling. If you aren't operating an eCommerce site, try to put these on every page. If you have multiple locations, make sure to put the hours for every location if they are different.
Don’t make it difficult to find your operating hours. Putting them prominently in the sidebar or footer of every page is a great way to do this in a clean and elegant manner.
2. Telephone number

Your local, and toll free if you have one, phone number should be clearly listed on every page of the website. If your business provides any sort of continuous support, make sure you put your after hours or other pertinent support numbers on there as well.
3. Street address of all locations

Every location that you operate should be listed on your site. If you only have 1 location, put the street address and a link to a Google map on every page. The footer is an excellent place to do this.
If you have a handful of locations, use a dedicated page for all locations, and make sure to include a Google map link, and the business hours for each location on the same page.
If you have many locations, a “find nearest location” search function should be accessible from every page. These are best placed in both the header and footer of the site. You can put a quick zip code based look up in the header of every page to make it extra-easy. Again, on the detail page for each location, make sure to put a maps link, the phone number, and the business hours for that particular location.
4. A list of products and services that you carry

You know a lot about your business, but a new customer probably won’t know specific details just from your name alone. You should always list major brands that you carry, or if you provide services, and anything else a customer might want to know before coming into your store.
“We sell sporting equipment” is not a good description.
“We sell the finest rock climbing, kayaking, and camping gear, and a full lineup of outdoor supplies and equipment” is much better!
5. Specials, sales and coupons

When you market to an audience on the internet, you are just one of a million other websites trying to sell to the same people. By providing web coupons, listing specials, and current sales, you instantly connect with your customer and they are far more likely to stay on your website, bookmark it, and later come into your store.
This is probably the least utilized marketing effort by small retail businesses, and it makes a big difference. You've paid someone to design, program, and host your website. If you aren't getting the people that visit it, to take action, you’re wasting your money. Or they’re too hard to find to be effective.

Friday, September 14, 2012

Why Websites SUCK and how we make them BETTER!!!

!!!!!!!!!Here is a list of ten reasons on why most small business websites suck and ten ways to make their small business website better!!!!!!!!!

Reason why websites "SUCK": 

  1. Static websites with no fresh content
  2. They took the “cheapest” route to get online just because they heard they should
  3. No call to actions
  4. Design is horrible
  5. Using Flash
  6. Using a free website solution that either uses a sub domain like or puts their ads on the free website until you upgrade to take it off.
  7. Small Business owners are usually great at what they do but don’t have a clue on the latest user interfaces, user experience techniques, and just think once they have a website they are done.
  8. Most of the small business websites we see are great for “current clients” in mind but aren’t used as sales tools or a welcome mat for new customers to sign up, call, or buy your product or service.
  9. They built their website in 1999 when people and phones both were not "Smart" and folks used terms like "Floppy drives" and it still looks like they were built in 1999
  10. They don’t treat their website like they do their location or real estate. When they find an office or a location to start their business they put thought into that and maybe even are willing to invest 20k a month for their retail or office space. But then they go and spend 2k on a crappy website? Your web space is virtual real estate and should be looked at that way.
How will we make it better:
  1. Use WordPress
  2. Invest money in (local web designer's) who have an updated portfolio of websites that fits your style and needs. Obviously like us!
  3. Check out services like if you still want a great web design but are on a low budget.
  4. Get a great domain name and consider either a great brand strategy related to your business name or use the main keywords of your service or product within the domain name. is a great place to buy domain names because they don’t sucker you into going through ten pages of crap to try an upsell stuff you don’t need.
  5. Use really good hosting that has 24/7 live chat support similar to and allows use to build other websites down the line if you need to. They also have 1-click installation of content management systems like WordPress.
  6. Think of a content strategy once the website is up. Are you going to blog to keep your site fresh with content related to what you do? Or maybe have a videos that you do and upload to the site if you aren’t into writing all the time.
  7. Answer questions that customers always ask you in person on your website. This way when they call they are ready to buy or just need a little more clarification before pulling the trigger on using your service.
  8. Don’t use flash, we are now in 2012
  9. Use WordPress plugins to make your site mobile friendly or help with the on page SEO structure of the site
  10. OR – Find a website management & marketing company you become familiar with, like and trust to do all of this for you so you can focus on your business. You don’t expect a web design and internet marketing company to know how to pull a tooth if you are a dentist, or change your oil if you are an auto repair shop, so we don’t expect you to build all of this better then someone that lives and breathes this every day..? If you want to take a shot at it keep some of these tips above in mind and let us know if you have any questions.

Saturday, September 8, 2012

Why is it alright to pay a little more for a well designed website!!!!

Your website is open 24/7
A website allows your business to be open 24 hours a day, 7 days a week and 365 days a year. There are millions of people, from all over the world, online at any time of the day. Many of them are looking to source products or services. If you run a conventional brick and mortar business, you can only attract the people who walk or drive past your shop, in any one day. Having a website designed for you allows you to attract new customers that would otherwise never find you - and they can do so when your shop is closed! A well designed web site also gives them a reason to revisit the site in the future. While we invest millions in designing and maintaining our shop or office to make sure we create the right impression on our customers, the same should apply for our website, wherein, not every designer or agency can achieve your vision and put it online in a professional and aesthetic manner.

Websites increase customer confidence
A professional, well designed website, with the right content, easy navigation and quickly accessible contact details, greatly increases customer confidence in your company. A well designed website shows people that you are forward thinking and customer focused, much in the way a well designed business card did in the past, which is an important factor in any buying decision that they have to make.

Websites increase customer referrals
What is easier to remember, or +919167677045?
A website address is much easier to remember than a telephone number, so it stands to reason that having a website increases the likelihood of referrals - and let's face it, referrals are one of the most important sources of new business. Without referrals and leads any business around the globe would stand no chance of surviving.

A website address increases the ROI when advertising
Including your website address on all of your adverts, business cards, letterheads, invoices, etc allows people to take action straight away, when they view an advert, or hear about your product or service. Visiting your website is so much easier than driving to your store, telephoning or writing a letter to you. When online, a potential customer can take their time and enjoy finding out about your products or services without the pressure of having a salesman floating about in the background. In fact with constant updates and technological development it is much easier now a days for your potential and existing customers to interact with you whilst they are on the website via tools like live chat, contact forms etc.

Website sales
Your website is one of the most impressive sales presentations that you will ever have. Allowing your customers to buy your products or services online is a wonderful and inexpensive way to expand your business. Spending thousands on advertising, for an ad that is featured in one mag, for one month simply doesn't compare to investing in a long term sales marketing solution - or a well designed website as we like to call them!
Even if you do not offer a product or service that can easily be purchased over the Internet, a website still acts as an impressive first contact, convincing the potential customer that they need what you are offering and inviting them to contact you, via telephone, email or contact form on your website. In short your website acts as your silent salesman.

Websites promote future business
When a potential customer comes into your shop and leaves without making a purchase and without speaking to anyone, they are basically a dead prospect. When someone views your well designed website and doesn't make a purchase straight away, they can easily revisit anytime to make the purchase in the future. On top of that, you can use your website to collect the email addresses of visitors and send them periodical promotional emails, newsletters or updates on your product or service. So although they may not buy first time around, you have more than one opportunity to close the sale!

RethinkingWeb believes in designing and developing websites which work for you and not just be brochures online which just give out information and not give back ROI. With “Dynamism” being the name of the game, we always have tried giving more than required. When it comes to delivering the best results we don’t compare we set the benchmark for others to follow.

Wednesday, August 29, 2012

Email communication- Important and Effective!!!

Email Signature Tips @

Make it easy for people to contact you and find your services by creating a great email signature. Here are some tips:
  • Use 2 hyphens and a space (-- ) as the first line of your signature. It's the official way to indicate the start of a signature
  • Make sure it's in plain text so people can copy/paste it
  • Keep it as short as possible, say less than 10 lines
  • Don't exceed 70 characters per line
  • Include your full name
  • Include your position
  • Include your business name
  • Include important phone numbers
  • Include your websites address and make it a link
  • Include a small logo or even photo of you. Keep it smaller than 100x100 and make sure you specify its width and height in the html
  • Reference images from somewhere on the internet so others can see them. E.g. on your website.
  • Don't include personal stuff like your own website. Keep a separate signature for that
  • You don't need to include your email address. That's already in the from field
  • Only add a legal disclaimer if required
  • Only include your business address if you have walk in customers
  • Don't add quotes or personal comments as they make a signature large and may offend

Email Signature Ideas

And some ideas on how to further enhance your signature...

  • Use your business colours and font
  • Include links to other networks such as LinkedIn, Facebook Fan Page and Twitter accounts
  • Link to a vCard file (don't attach one) which can be used to quickly add you to their address book
  • Add some sales pitch, like a link to a new offer or service
  • Encourage clients to write a review or testimonial about you
  • Add certification images
It's best to use a branded email address if possible. E.g. use your websites domains based email account over your ISP ( or web ( addresses. It's more professional and invokes trust.
I have several signatures for different uses. E.g. personal, business, replies, promotions. Make your signatures suite the moment. Reply signature should be shorter than main signature so that you don't clog up long conversations with long signatures.

Friday, March 16, 2012

Facebook Comments Will Now Be Indexed By Google

Google’s indexing initiative has potentially raised eyebrows of many people, while providing smile for others. News points to Google’s intention to index facebook comments (including others which are accessible only through an HTTP POST request).

facebook comments

Indexing by Google

With the indexing of comments, Google shall present user comments as standard search engine outcomes. The aim is to contain anything which lies hidden behind a form, like facebook, Disqus and other JavaScript-based applications. These powerful and easy to use web applications have served considerably in connecting people across the web effortlessly (one of the most vital reasons for their huge popularity).

There are two key requests which can be initiated on the web, namely GET and POST. The GET request is meant to read data, while the POST can ‘alter’ data. For this reason, search engine robots (like Google’s) have been sticking to the GET requests. Since reading data brings in no alteration to the content being read, Googlebot (program which determines which web sites to crawl and collects documents from the web) seemed a passive observer. But now, it can interact (and possibly alter) the content it crawls. However, there is less feasibility that Googlebot will ‘alter’ data.

Google could have done indexing of web content much earlier. With the emergence of Ajax (the technology which reduces the time lag between your click and search result) long ago, Google could have implemented this technique earlier. However, this is only an opinion.

The favorable element

Expanding search engine operation can extend the content and increase suitability. Users can expect to receive more appropriate results and click on what exactly they have been looking for.

This interesting change can be good news for SEOs, who otherwise find commenting platforms not much usable. The blog commenting did not provide search boosts to their websites till now. However, with this change, the text from comment boxes will be delivered in Google search.

More importantly, it will help users discriminate between what to comment and what not to comment online.

The unfavorable element

Considering the other side of the story, there is concern among developers regarding the POST requests of Googlebot. The involvement of robots increases the feasibility of errors, and any untoward incident may not be outright rejected. However, robots.txt file can be used to disallow Googlebot from crawling a website’s forms (for POST URLs).

Private users may not be happy regarding the invasion being done to their comments. Facebook users use the privacy settings to their advantage, when not wanting to socialize liberally. But with indexing, their names and comments will be revealed. Individuals have their boundaries set, and intruding into a ‘restricted area’ may be unwelcome. Facebook may come to help it users in some way, protecting their privacy.

Wait and watch

Google has revealed responsibility and does not intend to perform any task which can potentially lead to an ‘unintended user action’. With the growing popularity of user-friendly community portals like facebook, traffic is a crucial component in the industry. Many users may find it discomforting for their words to be made public.

It is time to actually ascertain the ups and downs of a technological innovation. Words are said to be more harmful than the deadliest weapons in the world, and it appears that there is going to be a sound motivation to this guideline.

Written by Guest Author

This post is written by guest author