How to Code PHP Part 2

Welcome to the second part of the How to Code PHP Tutorial. In this article I’ll show you the rest of the basics of using the PHP Engine. I’ll cover the following:

  • IF Statements
  • SWITCH Statements
  • FOR Loops
  • WHILE Loops
  • DO WHILE Loops
  • Including Files
  • Creating Functions
  • What Does Scope Mean?
  • Date and Time Functions
  • How to Send Email
  • Accessing Databases

Continue reading How to Code PHP Part 2

How to Code PHP Part 1

Do you want to learn How to Code PHP? Get your thinking caps on and let’s start cranking the PHP Engine.

PHP is a programming language that allows you to process and react to user actions on your website. While JavaScript allows you to process actions directly on a visitors computer, PHP requires that actions are processed on the server in which your website resides.

PHP is most commonly used to access databases on the server that hosts your website. Please read my SQL Tutorial before you read this article, or you may get lost. This tutorial will cover most all you can accomplish with PHP, but will very specifically cover how to interact with a database with PHP.

The Basics of PHP

Like my other tutorials, I will provide you with working PHP Sources you can use, but for now I’ll focus on the basics.

You can embed PHP code directly in your web pages by surrounding the code with an opening <?php and closing tag ?>. You also want to give your web page the PHP extension .php, when you embed PHP code in a web page. Continue reading How to Code PHP Part 1

Marketing Examples: Most Amazing Signs

One of the number one ways to make your business seem legitimate is to have an amazing sign. For some reason many business owners don’t have, or choose to use inferior signs. For those people that understand the importance of a great sign, I’ve assembled a list of some of the most beautiful sign samples I’ve ever seen. Use them as an example of what your sign should look like.

Put a sign like these in front of your place of business and wait for the customers to come pouring in. If these signs are used in collaboration with my store front and interior examples, watch out!

You can click the images for a bigger view of each sign. If you want to see more articles like this, comment below.

Sample Sign WinfreysSample Sign Virgin Megastore Continue reading Marketing Examples: Most Amazing Signs

The Diet Nutritional Plan & MSG

Ok, I got a ton of emails asking me about the following:

  • How does my diet help you avoid future weight gain?
  • What is MSG?
  • What does MSG do to your body?
  • What foods contain MSG?
  • What should do I do if I accidentally eat MSG?

Avoid Putting the Weight Back On

I accidentally created a diet that not only drops weight, but also keeps it off. Here is a giant article on The Diet Nutritional Plan I created and lost 64 pounds with. As I described in a past article, I based my diet off of about 20 Nutritionist Textbooks. It is a very simple diet, just avoid food high in fat, cholesterol and salt. Well in doing so, I cut out a food additive accidentally called MSG. By doing this, I now can’t eat anything unhealthy. Hence, permanent weight loss. Continue reading The Diet Nutritional Plan & MSG

MySQL & Statements in SQL

There are many misconceptions when it comes to databases:

  • Some people think they are hard to develop (Not True)
  • Many people think they are expensive (There are Free Versions Available)
  • Most people don’t know how to start using them (You’re in the right place)

In the next series of articles I will show you how to use mySQL. A completely free database server that many consider to also be the best. Heck, NASA uses MySQL.

So do you need one?

If you answer any of these questions affirmative, the answer is yes:

  • Do you have trouble managing your data, because it is unorganized
  • Do you have massive amounts of data that is too complicated to store in a spreadsheet
  • Would you like to provide access to your data on the internet
  • Would you like to be able to sort through and analyze your data

Continue reading MySQL & Statements in SQL

Diet Nutritional Plan Keeps the Weight Off

[youtube]http://www.youtube.com/watch?v=hhbS5oEFXOU[/youtube]My website is a bit odd with my focus on Web design, Communication, Marketing and Dieting! But, hey that’s me. I’m now down to 183 pounds and I’ve made a major discovery! Not only does my diet seem to hinder future weight gain, meaning the dreaded weight rebound, I think it may make it very hard to go back to unhealthy eating habits? Here is the link to the Original Diet Nutritional Plan.

This may be a positive or negative, but I can’t eat fast food anymore. Everytime I do I get stomach cramps. I’ve been doing a lot of research on this and I believe it is because of a chemical called monosodium glutamate (MSG). MSG is also known as Hydrolyzed Vegetable Protein, on products that want to state that they don’t contain MSG. Continue reading Diet Nutritional Plan Keeps the Weight Off

Marketing Examples : Best Store Interiors

A few articles ago I wrote about the Best Store Fronts. I will soon post a large assortment of beautiful signs, for all the people that have been asking for those. Today I’ll show you some of the most beautiful Store Interiors. These are the best of the best. I hope you enjoy them and if you have any other requests, post them below. -Think Tank

Store Interior for William SonomaStore Interior for Urban Outfitters Continue reading Marketing Examples : Best Store Interiors

Theory Negotiation : Bargaining for Advantage Pt 2

How to Win an ArgumentIn this article on Negotiation,  I’ll go further into “How We Make Decisions”. This information comes in part from a book called Influence: The Psychology of Persuasion, which is one of the best books I’ve ever read. Part one of this article can be found here Theory Negotiation : Bargaining for Advantage

Bandwagoning

As I explained in the last article, we make split second decisions by taking short cuts based off of previous events. We also determine what is correct by finding out what other people think is correct. This is called bandwagoning.

Bandwagoning is so powerful that 95% of people base their decisions on what the majority is doing vs. the proof. This rule becomes even more powerful when we observe the actions of people that look like us. Continue reading Theory Negotiation : Bargaining for Advantage Pt 2

Theory Negotiation: Bargaining for Advantage

How to Deal with PeopleAnyone that reads my articles realizes I read many books, but today I want to focus on just one because I think it’s one of the best I have ever read. It is called Influence: The Psychology of Persuasion. There are many theories involving how we can best negotiate. In this article and the next I’ll go further into how we make decisions. Now I’ll briefly go through some of the amazing ideas brought up in this book.

How People Make Decisions

Because we live in an extremely complicated environment we use short cuts to make nearly every decision. Our mind flashes back to previous events instantly when a decision is to be made and we act accordingly based off of previous results. If you are able to understand the shortcuts that people use you are able to negotiate to your own advantage.

Like I wrote in previous articles on Indirect Hypnosis, familiarity in the presentation of information speaks more truth, than the facts presented. If you present information using a persons chosen meta-program they will be much more inclined to believe it, because it falls inline with their level of thinking. Here are my articles on Meta-Programs if you are unaware of that term.

Think of it this way. We can easily fall into the habit of going to the same restaurant or store, because it is familiar and you know what you will get there. We develop these habits because our brain likes to have access to shortcut solutions to problems. Hence, you feel hungry so go to McDonald’s. What many people don’t know is that we have numerous habits that we are unaware of. Continue reading Theory Negotiation: Bargaining for Advantage

Javascript Video Scripting Tutorials

Here are all of my Javascript Video Scripting Tutorials and Javascript articles. I hope you find it to be useful.

Index to Articles on Javascript:

Continue reading Javascript Video Scripting Tutorials

Indirect Hypnosis NLP Meta Programs Pt 4

Here is the final Indirect Hypnosis article pertaining to Meta-Programming. If you perform this test on yourself you will learn a great deal about how your own mind works. Better yet, if you perform this test on others it will immediately eliminate any communication issues you may have. I hope you enjoyed this series and an online test is in the works right now. On to the final Meta-Programming questions.

What we Value, How we See Ourselves and The World

Value Style ( Survival / Security / Affection / Belonging / Self-Esteem / Achievement )

I value personal achievement above all else, followed closely by survival. Obviously everyone will value security and survival otherwise you wouldn’t exist or you would have an insufferable life. Saying that I still value Achievement because I’m of the belief that a life simply lived isn’t worth much. Just a personal opinion, not a judgement. Remember I’m forcing myself to be completely honest on this test.

All the other values are self explanatory. These are the values that drive a person through life. Some people wake up and think, “Today I’m going to do whatever I need to, to find someone to give me affection!” Others change their presentation so that they can feel a stronger sense of Self-Esteem or Belonging.

To find this style ask, “What do you value most in life”, “Name the most significant moment in your life.” Continue reading Indirect Hypnosis NLP Meta Programs Pt 4

Indirect Hypnosis: NLP Meta-Programs Pt 3

How we Decide, How to Respond through Communication and Work with Others

This article will continue to provide you with high level communication tools. These skills could be used with great effect in managing, marketing, or in your personal life. Well on to the exercises.

Recharging Style (Extrovert, Introvert, Balanced)

I definitely am balanced in this personality style, again because I work on it. I’m naturally an introvert, but I’m so uncomfortable in situations in which people are not talking, I start conversations immediately upon entering a room. Everyone thinks I’m an Extrovert and I do get very charged up in social situations, but I’m also happy when they are over.

There is a big misconception that an Introvert is antisocial. No, they just don’t get energized or relax around other people. They feel taxed. Just because you enjoy and get your best work done while alone is not a negative.

Extroverts have tons of friends and look for the outside word to energize and entertain them. These are the shoot from the hip types. It is to be noted that while they have many friends, they normally have less deep relationships than an Introvert.

To find out who your dealing with ask, “When you need to calm down after a long day do  you prefer to take some time alone, or go out with friends?” Continue reading Indirect Hypnosis: NLP Meta-Programs Pt 3

Indirect Hypnosis: Meta-Programs Pt 2

In this article, I’ll continue explaining how our brains work. I will use my own personal results as an example. If you ask people the questions I present here you will learn how a person:

  • Reasons
  • Gathers Information
  • Decides on Preferences
  • Deals with Stress
  • Emotes
  • Reacts to Situations
  • Makes Decisions

I’ve received some comments asking why you would want to know this information? This is what we refer to as high order rapport building. I wrote an article on Rapport Building and Subliminal Marketing that explains what Rapport is. To get right to it, Rapport Building is the act of getting someone to trust and like you.

People are inclined to like people that they feel are like themselves. So, if you know exactly how their brain works you will easily be able to present ideas to them that will be instantly understandable, while making them more agreeable. Hence the term Indirect Hypnosis. Continue reading Indirect Hypnosis: Meta-Programs Pt 2

Indirect Hypnosis: NLP Meta-Programs

NLP is used in nearly every form of professional marketing you consume on a daily basis. It is a branch of psychology, first created, by Richard Bandler and John Grinder.

NLP techniques are used to figure out how a person’s brain processes information. More specifically how a person:

  • Reasons
  • Gathers Information
  • Decides on Preferences
  • Deals with Stress
  • Emotes
  • Reacts to Situations
  • Makes Decisions

A basic introductory article on NLP is available here. When you are first trained on how to apply NLP techniques, you are asked a series of questions that tell you how your own brain works. In this article I will show you my results. The process is known as Meta-Programming. While it is a bit dangerous for me to put my information out there, because this information is extremely valuable to marketers and sales people, I trust I can keep from being manipulated. But, can I really? I guess I’ll find out?

Continue reading Indirect Hypnosis: NLP Meta-Programs

Javascript Scripting Tutorial: Built in Functions

In this article, I’ll list all of the built in functions available to you with Javascript. While not everything will be covered, I will cover every function that is used on a regular basis. I’m still deciding whether I’ll cover Javascript Graphics or AJAX next. Leave comments below to help me understand. On to the functions.

Javascript Array Functions

In previous articles I described how to create Arrays, but if you forgot here is how you create arrays:

  • var a = new array() // Creates an empty array
  • var b = new array(8) // Creates an array with 8 element cells
  • var c = [1, 2, “turtle”, “number”, true]; // Creates an array with a bunch of random values

Javascript Array Properties and Functions

  • b.length // A property that would return the value of 8, because of the array declaration above
  • c.concat(3,4) // The array c now has the values 1, 2,  “turtle”, “number”, true, 3, 4
  • c.join(“: “) // Returns a string with each element separated by a colon and a space. 1: 2: number: true
  • c.slice(0, 2) // Returns an array which contains all elements between the first value you pass to the second value. In this example you would be returned [1, 2, number]
  • c.sort() // Returns the array elements in alphabetical order. This example returns [1, 2, number, true, turtle]
  • c.toString() // Converts the array into a string and then returns the string.

Continue reading Javascript Scripting Tutorial: Built in Functions

Javascript Scripting Tutorial Pt 5

Error Handling in Javascript

I’ve covered most everything you need to know to program in Javascript except for Error Handling. So, in this article I’ll explain how to handle those nasty errors when they crop up.

An exception is thrown whenever an error occurs in your code. You can set up your code in a way, so that it throws exceptions that you have a pre-built solution for. Let us say one of your functions divides numbers. We all know that dividing into zero produces a result of infinite. So, it would be a good idea to head off a zero division. How would you do that?

You would write some code that throws the exception or error and then catch and respond to such an error. The throw statement follows this style: throw expression;

Normally, the value of the expression is a string that represents what error caused an exception to be thrown. Ex. throw new error(“A division by zero occured”); Continue reading Javascript Scripting Tutorial Pt 5

CSS Menu Drop Down

A few articles ago I showed you how to make a basic website layout in my Styling HTML with Cascading Style Sheets Tutorial. Was it the most beautiful page? Not exactly, but it was easy to understand, which was the point in making it simple. Here it is if you missed it.

Simple Two Bar CSS LayoutClick here to be taken to the web page to your left.

Feel free to do whatever you like with the code and if you have any problems editing it drop me a comment below.

So, we have a simple layout with a title bar, footer, side bar and main content div setup. This is the basic layout used for all WordPress themes. And, yes I am going to create a tutorial on designing custom WordPress themes very soon.

Continue reading CSS Menu Drop Down