Thursday, August 16, 2012

PHP - Form elements

In this article we will see how to create form in PHP and send data to next PHP page. Like other languages you need to specify the methods with which your data will be sent - "GET" and "POST". If you've used the POST method, you can find that data in the $_POST array similarly if you've used the GET method, you use the $_GET array. These array are "super global" arrays, which means that they're available to you without having to use the global keyword. Also, there is a $_REQUEST array which holds data from both $_GET and $_POST array.

We will create a form which contain various form elements like text box, password, radio button, select dropdown, text area and check box.

Using Twitter To Build Brand Integrity


A company's ability to humanize itself gives its reputation an endearing appeal to the public. High-ranking executives who take time to interact with ground-level clients and customers are assets to a company's marketing and advertising goals.

With the advent of enterprise blogging, companies can now use social media to reach out to their potential customers just by using a social media platform. Twitter is at the forefront of the microblogging trend where people share thoughts and information real-time.

Here are some pointers on how to make the most out of your Twitter account to build a solid relationship with your clients and develop a humanized image of your company:

Be Present and Active For Your Twitter Followers in the UK and around the world

1. Put yourself out there and really share honest, personal information about your company. You are not expected to tweet your own personal issues in your life, but giving your followers real-time updates about company activities will make your business more relatable.


Saturday, August 11, 2012

PHP - Database connectivity


Below are the 6 steps used for PHP database connectivity.


Step 1. Create a connection to the database using mysql_connect() function, which returns a connection object.

Syntax : $con = mysql_connect("localhost","root","password");

Step 2. Select database or schema using mysql_select_db() function

Syntax : mysql_select_db("database_name", $con);

Step 3. Execute the query using mysql_query() function. This function is used to send a query or command to a MySQL connection. It returns result object

Syntax : $result = mysql_query($sql);

Step 4. Looping through results. mysql_fetch_array() function is used to fetch a result row as an associative array, a numeric array, or both.

Syntax : $row = mysql_fetch_array($result)

Step 5. Printing the results. Simply printing the values from result array.

Syntax : echo $row['column1']." ".$row['column2'];

Step 6. Closing the connecting using mysql_close() function.

Syntax : mysql_close($con);


Please see the complete tested code, Save the page with .(dot) php extension e.g. ConnectDatabase.php. Provide correct credentials and see the output.


Friday, August 10, 2012

JavaScript - Simple pagination logic


This article will help you to know how you can create a pagination in any webpage. Here I have used it in JavaScript, of course you can use it in any other language as u wish like Java, PHP, ASP etc.

What is Pagination?

Pagination is nothing but the sequence of numbers assigned to a content in webpage. Lets say if you want to show number of contents in a particular web page, its not recommended to show all of them in a single page instead show specific number of contents in one page followed by next set of content in next page and provide navigation to go through each page. In the same way when we do Google search you can see navigation appears at the bottom of the page to go to the next page.


Please see the self explanatory html code below, no need to have any server directly you can run and see the output

Sunday, July 29, 2012

How to boost your Instagram Followers to increase your social output


The Instagram mobile application is now more popular than ever, behind Pinterest it is the fasting growing social network; now topping 80 million worldwide users.  Not bad considering it’s designed to be a mobile only service.
In order to build large numbers of followers through Instagram, there are some tested and tried techniques that you can use. Unfortunately, as with all things in life – the best route is also the longest route.

Upload better photographs (Simple!)

At first, your only consideration should be the creation of attractive photos. The reason for this is that people have the tendency of following accounts that only present the most relevant and beautiful snaps.  This makes sense and is often lost on marketers who are looking to crack a new social field.  Customers don’t care if you are Nike or Adidas or even Facebook or their favourite football team – they are on Instagram to see photos that they enjoy looking at.

For this reason, you need to come up with a good plan every time you are taking a photo.
Refrain from taking meaningless or trite photos, which many people see every day. According to Nick Bilton who works for the New York Times, (his Instagram account has more than fifty thousand followers)

“people are more likely to follow you for quality over quantity – yes you could take a fancy picture of your starbucks cup but if I don’t know who you are and your photo is generic, I won’t be following you.  The first rule of instagram is – think quality

Publishing excellent and average photos at the same time is not good because the mediocre photos can act as a turn off to your visitors – a user on Instagram is 40% more likely to unfollow you than on twitter as there is less social engagement.

Additionally if you have a large number of attractive photos, it’s advisable to post them in moderation. This is to keep the interest of people following your Instagram account high and they will continue checking your photos regularly.  Think of it like you are telling a great story to your children – you don’t give the story away in the synopsis – you develop the story over time and keep their intrigue.