Factors Influencing Consumers Purchase Intentions towards Private Brands

Abstract

The change in market trends, of late, is marked by the growth of ‘brands’ for consumable items. Now, people prefer ‘branded’ products even for household use instead of random selection. Keeping in view the changing trend, this study explores the factors influencing purchase of private brands in Karachi and to understand how those factors affect the purchase intentions of consumers towards private brands.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

How to check if a file exists on remote/local server using php

Linking to a file or displaying an image from remote server is very common practice these days. But problem occurs when the file is not there on the remote server and our page starts showing a broken link. For this problem I have few solutions that will help you in avoiding this issue.

Solution # 1: Using file_exists()

Syntax
file_exists(string $filename)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Creating a connection to MySQL in PHP - Php For Beginners - Lesson 11

Whenever we want to access the data in the mysql database using php, we have to create a connection to that particular database. Once the connection is establish we can insert and retrieve any data from the mysql database.

Creating a Mysql connection is quite simple in php, a simple built-in php function "mysql_connect()" is used for this purpose.

Syntax:

mysql_connect(servername,username,password); 
Where servername is the name of the server to connect, username and password are the credentials used to connect to the database.

Selecting a Database:
Once a connection is established to the database, we have to select the particular database that we want to use for inserting and fetching the data. This can be done by using another built-in php function "mysql_select_db()".
Syntax:
mysql_select_db(database,connection)
Where database is the name of the database and connection is the connection created in the earlier part of this article.

Working Example:
Since connecting and selecting the database is required each time we want to use a database. So we can save the code for creating the connection and selecting the database in a file and include it wherever we want to use the database. You can name that file as "connection.php" or whatever other name you want. Contents of this file are as follows:
<?php
$db_host="localhost";
$db_user="root";
$db_pass="";
$db_name="any_db";

$con=mysql_connect($db_host,$db_user,$db_pass) or die ('Can not connect to database');
mysql_select_db($db_name,$con) or die ('Can not Select Database');
?>
If you are using this code on the local server then the above mentioned configuration will work fine, as the default host/server name is always "localhost", user name is always "root" and password is always "" for the local server, but if you are using it on some web server then you have to change these settings to your web server's settings. The db_name is the name of the database that you want to select.

Well I guess this is all for this lesson, for any queries, should you have, feel free to comment and ask.

next Previous Lesson

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Enable double escaped sequence in IIS 7

HTTP Error 404.11 – URL_DOUBLE_ESCAPED 

Add the following code in application host file and it will allow double escaped sequence for the default website and those child websites under it.
Open %windir%\System32\inetsrv\config\applicationHost.config

Details # http://support.microsoft.com/kb/942076

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Mysql Introduction - Php For Beginners - Lesson 10

Databases are very important in the field of web development. A database is a collection of data in a very organized fashion. By organized fashion it is meant that the data will be stored in different tables. So that it will be easier to retrieve the date when needed. The most common database used with php is Mysql. Mysql is a relational database. A relational database is one in which tables are linked together.

What is a Table?
A table is an structure in which the datat is stored, It can contain rows and columns. Columns are used to categorize the data and rows contain the actual data. For example if a company contains its user's data in a table named 'Users' then the table structure may look like this:


User Id User Name Email Password
1 John john@example.com 123
2 Smith smith@example.com 456

In the above example, A company's users table is shown, it contains 4 columns and 2 rows. 4 columns are the categories and 2 rows are actual data. It is not mandatory that each row contains all the columns, some times rows can contain empty columns.

What is a Query?
A query is an statement used to manipulate the data in the database. You can write queries to Insert, retrieve, delete, and update the data and also to perform any action on the data present in the database.A sample query may look like this:
SELECT email FROM users
The above statement is used to retrieve all the emails from the users table. So the output of the above query will be like this:

Email
john@example.com
smith@example.com

Well I guess that's all for the introduction, further details will be discussed in the later lessons. For any queries or questions should you have, feel free to comment.

next Previous Lesson --- Next Lesson next

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati