Posts tagged: Development

Website Development and Maintenance Checklist

Basic questions to ask for website development Does your website HTML validate to W3 standards? Have you check broken links of your website? Do you have Google XML sitemap? Do you have a text-based sitemap for visitors? Do all pages have unique and corresponding META title tag? Does your homepage have at least 200 or 300 words optimized for search engines? Have you done user experience testing? Basic questions to ask for website maintenance Do you keep track of web log statistics such as visitors, page views, or conversion rates? Do you regularly check error logs of your web site? Do you know which search engines provides the most traffic to ...

Avoiding Submit.x and Submit.y

I had an issue with the URL ending with submit.x=99&submit.y=99 when the form submit is through an image button.(Numbers are the location point of the click on the image button.) I found a simple answer for this. In the form tag add, ''onsubmit="this.submit();return false;''. <form id=''exampleForm'' name=''exampleForm'' onSubmit=''this.submit();return false;''> This will remove submit.x and submit.y.

Solution for PHP Smarty three columns

Example 1 Create a three-column table. (Display x items in one colum. For example, list 50 US states in three columns, that is, 17, 17 and 16 in each column.) <table border='0' cellpadding='0' cellspacing='0'> <tr> <td width='33%'> <{foreach name=states from=$data.states key=key item=state}> <{capture name='column'}><{math equation="x % 17" x=$smarty.foreach.states.index}><{/capture}> <{if (($smarty.capture.column == "0" ) && (($smarty.foreach.states.index != "0" )))}> </td><td width='32%' align='left'> <{/if}> <a href="<{$rootDir}>state.php?pid=<{$}>"><{$}></a><br /> <{/foreach}> </td> </tr> </table> Example 2 Create a three-column table. (Display each item in a cell and there are 3x times items.) <table border="0" cellpadding="0" cellspacing="0"> <tr> {foreach name=products from=$products item=product key=key} {capture name="column"}{math equation="x % 3" x=$key}{/capture} {if ($smarty.capture.column == "0")} </tr><tr> {/if} <td width="33%" align="left"> {$} </td> {/foreach} </tr> </table>