Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Archive for July, 2014

Emotional Branding

Tuesday, July 29th, 2014 by Servage
Emotional Brain Internet marketing is entering a rapidly advancing stage with the onset of handheld devices, where the Internet is now ubiquitous and reaching vast audiences in unpredictable use cases. Ever growing online identities of businesses make Internet marketing challenging, yet interesting for those who attain success. Every aspect of today’s Internet marketing is end-user centric. Whether it is UX, design, or programming, web designers must also adapt to the user-centric paradigm. We need to study the behaviors of users carefully, in order to learn the techniques which grab their immediate attention and hit conversions. Therefore, we must understand the factors which influence their buying decisions. A short while ago, we placed emphasis on impressive ...

Variable-assignment in PHP

Sunday, July 27th, 2014 by Servage
php-variableThe syntax to assign a value to a variable is always variable = value. Or, to reassign the value to another variable, it is other_variable = variable. There are also a couple of other assignment operators that you will find useful. For example, we’ve already seen: $x += 10; which tells the PHP parser to add the value on the right (in this instance, the value 10) to the variable $x. Likewise, we could subtract as follows: $y -= 10; Variable incrementing and decrementing Adding or subtracting 1 is such a common operation that PHP provides special operators for these tasks. You can use one of the following in place of the += and -= operators: ++$x; −−$y; In ...

Device agnostic javscript – Part 2

Thursday, July 24th, 2014 by Servage
JavaScript-2 In part 1, we covered the fundamentals of JavaScript and now we will proceed with the basic ideas of JS syntax. JavaScript is similar to other modern languages in the way sentences are constructed. JavaScript Syntax The major components of JavaScript syntax include the following: Literals: in any programming language, there are constant values which may appear as numerals (Number Literals) and as words in single/double quote (String Literals). Variables: means data containers that store information. You can assign a value to the named variable using = (equal sign). Operators: with these you can compute values, as you do in math. You can also assign computed values (operators) to a named variable and can use expression ...

Device agnostic javscript – Part 1

Monday, July 21st, 2014 by Servage
JavaScript-1 JavaScript (JS) is a buzzword in today’s programming community. JS has established itself as a necessity, not only on the web, but across all devices, large to small. Mistaking Java for JavaScript is normal, as the first four letters seem to suggest they are interchangeable. In fact, both are quite different programming languages. Java is developed by Sun Micro System; whereas, JavaScript was invented by Brendan Eich and later adopted by the standard association now known as Ecma International. The pervasive properties of JavaScript come from the DOM (Document Object Model) capability to manipulate code. JS can change HTML elements as well as other language elements, including server-side to client side languages ...

MYSQL commands – Part 7

Friday, July 18th, 2014 by Servage
table_in_useRemoving a column You may also decide, upon reflection, that the page count column pages isn’t actually all that useful for this particular database, so here’s how to remove that column using the DROP keyword: ALTER TABLE classics DROP pages; Remember that DROP is irreversible. You should always use it with caution, because you could delete entire tables (and even databases) with it if you are not careful! Deleting a table Deleting a table is very easy indeed. But, because I don’t want you to have to re-enter all the data for the classics table, we won’t delete that one. Instead, let’s quickly create a new table, verify its existence, and then delete it by typing ...

Understanding variables

Thursday, July 17th, 2014 by Servage
aaThere’s a simple metaphor that will help you understand what PHP variables are all about. Just think of them as little (or big) matchboxes! That’s right, matchboxes that you’ve painted over and written names on. String variables Imagine you have a matchbox on which you have written the word username. You then write Fred Smith on a piece of paper and place it into the box. Well, that’s the same process as assigning a string value to a variable, like this: $username = "Fred Smith"; The quotation marks indicate that “Fred Smith” is a string of characters. You must enclose each string in either quotation marks or apostrophes (single quotes), although there is a subtle ...

MySQL Commands – Part 6

Wednesday, July 16th, 2014 by Servage
figure2Continued from part 5... The second line of each INSERT command contains the keyword VALUES followed by four strings within parentheses, separated by commas. This supplies MySQL with the four values to be inserted into the four columns previously specified. (As always, my choice of where to break the lines was arbitrary.) Each item of data will be inserted into the corresponding column, in a one-to-one correspondence. If you accidentally listed the columns in a different order from the data, the data would go into the wrong columns. The number of columns must match the number of data items. Renaming a table Renaming a table, like any other change to the structure or meta-information of ...

MySQL Commands – Part 5

Monday, July 14th, 2014 by Servage
qqAUTO_INCREMENT data type As its name implies, a column given this data type will set the value of its contents to that of the column entry in the previously inserted row, plus 1. This is your introduction to the ALTER command, which is very similar to CREATE. ALTER operates on an existing table, and can add, change, or delete columns. Our example adds a column named id with the following characteristics: INT UNSIGNED Makes the column take an integer large enough for you to store more than four billion records in the table. NOT NULL Ensures that every column has a value. Many programmers use NULL in a field to indicate that the field doesn’t have a value, but ...

PHP character-usage

Sunday, July 13th, 2014 by Servage
BM8T0Escaping characters Sometimes a string needs to contain characters with special meanings that might be interpreted incorrectly. For example, the following line of code will not work because the second quotation mark (apostrophe) encountered in the word sister’s will tell the PHP parser that the end of the string has been reached. Consequently, the rest of the line will be rejected as an error: $text = 'My sister's car is a Ford'; // Erroneous syntax To correct this, you can add a backslash directly before the offending quotation mark to tell PHP to treat the character literally and not to interpret it: $text = 'My sister\'s car is a Ford'; You can perform this trick in almost ...

Keep your WordPress installation secure

Saturday, July 12th, 2014 by Servage
Altering File Permission for SecurityWordPress security is a prime concern for any WordPress programmer hence they are taking various measures to tackle it with utmost care. There are many security plugins available in the market to manage them, but not sufficient to do all jobs at all levels. In due course, a WordPress developer has to learn various direct coding techniques to manage security aspects successfully. At coding level, file system and its permissions and ownership, in particular, are playing crucial role to leave serious vulnerability if handled without the necessary care. Therefore, for a WordPress programmer security measures begin right up at installations. If you don’t have adequate knowledge of how to ...