How To Get Current Page URL In PHP

Sometimes, you might want to get the current page URL that is shown in the browser URL window. For example if you want to let your visitors submit a blog post to Digg you need to get that same exact URL. There are plenty of other reasons as well. Here is how you can get current url in php.

• • •

Display Unsupported Image Formats In Browser

Most of the browsers do not support most of the image file types rather than some common file types like JPG, PNG and GIF. But in most of the web projects user need to upload some most used file types like PSD, PDF ( Unsupported image formats ) etc. and they need to see what they have uploaded is perfect or not.

• • •

Scroll To Specific Section Using jQuery

We can scroll to specific section using jQuery method .scrollTop(). .scrollTop() expects a parameter, that is , the pixel value where the scroll bar should scroll to.

is able to scroll the window ( if there is enough content in it ). You can also get desired value with offset() and position().

This will scroll the contact element to view. The non-jQuery alternate method is .scrollIntoView(). You can call that method on any DOM element like:

true indicates that the element is positioned at the top whereas false would place it on the bottom of the view. The nice thing with the jQuery method is, you can even use it with functions like .animate(). So you might smooth scroll something.

• • •

PHP MySQL Interview Questions

I’ve been interviewed by many companies for PHP development positions, every company has a slightly different interview process, but there seems to be a lot of commonalities among them. I’ve outlined below the main areas that companies look for knowledge in, and some questions/answers you may get asked. At the end of the day you will not be able to entirely fake your way through a good interview, but I thought this would be a huge help for newer or mid level developers going into an interview. So given below are some PHP MySQL Interview Questions to help you out there.

• • •

A Guide To WordPress Custom Post Types: Create, Display & Meta Boxes

Custom Post Types are a new set of administrative options appearing along with the default post types such as PostsPagesAttachments etc. A Custom Post Type can store any type of information. It has a dedicated editor, media uploader and uses the existing WordPress table structure for ease in data management. The main advantage of creating custom post types using the WordPress API is that it equips itself well with existing themes and templates. Custom Post Types are also SEO friendly because of their nifty permalinks.

• • •

Live URL Of jQuery UI Themes

jQuery UI is a JavaScript library that provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript library, that can be used to build interactive web applications.

• • •