Shopping Cart In PHP – Learn PHP Programming

A shopping cart in php will be a good example for learning. When I started using PHP, I began like most other people; the basics. I then promised to show you how to create a simple shopping cart. I have to warn you beforehand, this is not really a complex version. I figured it is smart to start with a simpler version then add more functionality to it as we proceed. So, let us get to it. I am going to do this in reverse, that is, show you snapshots of the cart then dissect the code. So, here we go!

A simple python script to find bloggers on twitter

Hi! I know you are probably asking what the heck is he doing? I will be honest here, this is not a tutorial but a simple quick fix to a problem I faced last night. I was invited by an author to take part in the so called blog hopping. One of the requirements was to find at least five other authors with blogs to join the adventure. So, I asked myself, how could I make this as much fun as possible and learn something at the same time?

Free Software Training Courses – 90 Days

Free software training courses can help you get up to speed as a developer who likes learning new technologies. I hope you find it helpful.

Today, I have decided to take a brief detour from my regular posts and share something so good with you. I think it does not hurt to take a breather from all the code and documentations(this is not to say that you should stop reading your docs).

free software training courses

PHP If Statements – Making Decisions PHP Tutorial

PHP If Statements can help you make decisions in code. I figured before I jump into the shopping cart, I should show you how to use if else statements which are common among many programming languages PHP included. They include if, else, and else if. I will share examples for each case and finally touch on switch statements and Arrays in this php tutorial.
php if statements

PHP if Statements

[php]
#Conditional statements are used to make decisions in programs
#Here is the skeleton:
<?php
if (condition){
//do something
}else{
//do something else
}
?>
#Let me drive this point home a little easier!
<?php
if (your electric bill is due){
//go pay your bill pal
}else{
//don’t worry about it, just enjoy the light
}
?>

A really brief introduction to PHP syntax

In this php tutorial, I am going to start with some syntax then jump straight into building a simple shopping cart. Sounds exciting right? So, let us get started. Note: if you have used other languages like Java or Javascript, you will find some syntax used in PHP quite familiar. If this is your first language, do not worry, it is actually easier than you think: One more warning: The reason why I will not spend so much time teaching syntax is because there are more than enough tutorials online that do just that and I didn’t want to create yet another one!

Programming With PHP – Setting Up The Camp

After completing my first two challenges from Mozilla P2PU (HTML and Twitter API programming), I have decided to continue the amazing journey of learning new things. So what is up next for me? The answer is learning PHP. What does PHP stand for? It stands for PHP: Hypertext Preprocessor – which is a recursive acronym.

The next question you might be asking is: what the heck is PHP? I will make it simple enough to understand and then leave the rest to PHP on Wikipedia . So, php is an open-source server-side scripting language designed for web development to produce dynamic web pages. Something worth mentioning here is Rasmus Lerdorf – the creator of PHP (Give credit where it is due)!

How To Use Github Public Repository

Let us learn how to use github public repository.This happens to be my last post on this Programming With Twitter API journey. I do not feel sad because this is actually just the beginning! I will not stop here, I will keep making something better out of it. This has been a great adventure, very informing and fun. So, without much a do, I want to show you(if you have not done this before), how to make our code publicly accessible to interested people who want to read it and even use it for their own learning or applications. I am going straight to github – by the way this is not the only one, look for bitbucket or something that makes you happy.

The Force Is Strong With This One

So, we are almost at the end of the journey here and I am so excited to do so. In my previous post, I demonstrated how to pick up the pieces from the returned data and put them into a single file. That was easy right?

The problem is that if someone else wanted to use my code, they would have to change parts of the code every time, which is not very smart! Today, I am going to put our code together, encapsulate it in a function that will take one parameter from the user and perform the tricks behind the scenes and boom, you get clean tweets containing the query keyword you entered. I know, I should stop talking and show you what I did:

Patience, Young Padawan – More Code

Today, I am going to explore farther or deeper into what we can do with what Twitter API calls returns to us. I will make the whole post a step-by-step tutorial so that anyone interested in trying the codes out can do so with ease. So, let us get started.

[python]

#Always remember to use comments when writing code
#since we are using Python as our programming language
#of choice, we will make sure to import the necessary
#modules or libraries into our file

import urllib2
import json

[/python]

Hone Your Powers – Part 2 (JSON)

In this challenge, we are required to perform some data parsing using JSON methods. Since I am going to use Python, I will be importing some libraries into my file and then make some real API calls to Twitter instead of using the provided JSON data.

I am going to do several things and still make this post as short as possible!

[python]
#perform some data parsing using json.
#make api calls to twitter servers
#### mozilla challenge – programming with twitter api

import urllib2 #python module for handling urls
import json #json anyone??

url = ‘http://api.twitter.com/1/statuses/user_timeline/eenvincible.json’