Javascript Confirm Form Submission Many times you may wish to have the user confirm, before they process a form’s action. For instance, clicking the button may activate a deletion process which you wish to have the user confirm before proceeding. This code allows your users to confirm whether they wish to proceed when processing a …
Category Archives: Programming
htaccess – friendly url tips
suppose you want example #weeddingplans RewriteRule ^weddingplanners$ shop.php?sub=31&id=7 [L,S] RewriteCond %{REQUEST_URI} /shop.php [NC] RewriteCond %{QUERY_STRING} ^id=7&sub=31 RewriteRule (.*) http://www.wedstar.gr/weddingplanners? [R=301]
Mysql auto Datetime timestamp
On default valeu of timestamp add this CURRENT_TIMESTAMP
friendly url with htaccess
suppose you want /articles.php?cat=$1&art=$2 to become magazine/1/2 then you need these two rules: #articles.php?cat=$1&art=$2 RewriteRule ^magazine/([^/]*)/([^/]*)$ /articles.php?cat=$1&art=$2&marker [L] RewriteCond %{REQUEST_URI} /articles\.php [NC] RewriteCond %{QUERY_STRING} ^cat=(.*)&art=(.*) RewriteCond %{QUERY_STRING} !marker RewriteRule (.*) http://mydomain/%1/%2? [R=301,L]
Top 5 Online .htaccess Mod Rewrite Rules Generator
You might be aware of mod_rewrite rule and .htaccess file if you are using wordpress as your Blogging platform, .htaccess is the apache’s default directory level configuration files which can be used to password protect and redirect requests. Webmasters need to give special attentions to .htaccess on apache webserver as its very difficult to enforce …
Continue reading “Top 5 Online .htaccess Mod Rewrite Rules Generator”
Determine execution time in PHP
<!– put this at the top of the page –> <?php $mtime = microtime(); $mtime = explode(” “,$mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; ;?> <!– put other code and html in here –> <!– put this code at the bottom of the page –> <?php $mtime = microtime(); $mtime = explode(” “,$mtime); …