Archive for the 'Beginners' Category

Installing WordPress quick and easy

There are a lot of blog software’s out there but the best by far is WordPress. It is fully customizable, easy to use, it has a lot of plugins, it is SEO friendly etcetera. In this tutorial you will learn to install WordPress.

Switches and the Ternary Operator

I know for sure that every programmer came at least once into a quite a nasty problem and that is “What the hell have I coded here ?”. We all use the IF…ELSE statements and we all get sometimes into very big codes where you don’t understand a thing. In this tutorial you will learn about the SWITCH statement and the TERNARY operator witch are very helpful in this cases. Enjoy!

Dreamweaver - making an email sending form

For this tutorial you will need some files found at http://www.tutvid.com/downloads.html. You will learn to build an email handling PHP script that sends info from your on line form to your e-mail. For this you will need any version of Dreamweaver.

PHP calculator

This is a very interesting tutorial if you would like to build your own calculator written in PHP. It guides you through all the steps and it is very clean written and has a good error checking. It uses if, witch and other math functions.

And … from users recommendation I have inserted the php code used in the video:

<?php

if ( !$_POST['submit'] ) {
	echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"3\">\n";
	echo "<form method=\"post\" action=\"calc.php\">\n";
	echo "<tr><td><input type=\"text\" name=\"num1\"/></td>\n";
	echo "<td><select name=\"sign\"><option value=\"plus\">+</option>\n<option value=\"minus\">-</option>\n<option value=\"multi\">*</option>\n<option value=\"divide\">/</option></select></td>\n";
	echo "<td><input type=\"text\" name=\"num2\"/></td>\n";
	echo "<td><input type=\"submit\" name=\"submit\" value=\"Calculate\"/></td></tr>\n";
	echo "</form></table>\n"; 
} else {
	$num1 = $_POST['num1'];
	$num2 = $_POST['num2'];
	$sign = $_POST['sign'];
	
	$errors = array();
	
	$signs = array('plus', 'minus', 'multi', 'divide');
	
	if (!$num1) {
		$errors[] = "You did not supplied the first number";
	} else {
		if (!$num2) {
			$errors[] = "You did not supplied the second number";
		} else {
			if(!$sign) {
				$errors[] = "You did not supplied a sign to calculate your two numbers";				
			} else {
				if (!in_array($sign, $signs)) {
					$errors[] = "Invalid sign for calculation";
				} else {
					if($sign == "divide") {
						if ($num2 == 0) {
							$errors[] = "You cannot divide by 0. Please choose a different number to divide with";
						}
					}
					
					if (!is_numeric($num1)) {
						$errors[] = "Your first number is not numeric";
					} else {
						if (!is_numeric($num2)) {
							$errors[] = "Your second number is not numeric";
						}
					}					
				}
			}
		}
	}
	if (count($errors)>0) {
		echo "The fallowing errors occurred:<br>\n";
		foreach ($errors as $error) {
			echo $error."<br>\n";
		}
	} else {
		switch ($sign) {
			case 'plus':
				$equation = $num1 + $num2;
				$written = $num1 . " + " . $num2;
			break;
			
			case 'minus':
				$equation = $num1 - $num2;
				$written = $num1 . " - " . $num2;
			break;
			
			case 'multi':
				$equation = $num1 * $num2;
				$written = $num1 . " * " . $num2;
			break;
			
			case 'divide':
				$equation = $num1 / $num2;
				$written = $num1 . " / " . $num2;
			break;
			
			default :
				$equation = "";
				$written = "";
			break;
		}
		
		echo $written . " = " . $equation; 
	}
}
</pre>

How to create a database

This is the perfect video tutorial for beginners how want to make from the beginning a good database layout. Take this very serious because the saying “think first and act later” must be taken in consideration when thinking about databases.

PHP - Server side vs. client side

I think this should have been the first tutorials posted on VideoPHPBlog.com. In this video php tutorial you will be explained the basics of what the web server is doing when it receives a web page request and the difference between server side and client side programing.

By the way … very good job done by http://www.idea22.com.
pluginspage="http://www.macromedia.com/go/getflashplayer" flashVars="allowfullscreen=true&logo=http://www.idea22.com/public/swf/i22.png&autostart=false&file=http://www.idea22.com//public/videos/200706098270029656.flv&image=http://www.idea22.com//public/videos/200706098270029656.jpg" />

PHP Security

Like every programing language, PHP too has some security rules that should not be overlooked. Take a look at this fine video php tutorial to understand this.

For and Foreach functions

This video tutorial will teach you how to use For and Foreach functions.

PHP Installation and The Basics

Yes another PHP instalation tutorial. But this one is more detailed and better explained. It will show you how to install XAMPP and the first steps in making a simple PHP script.

PHP - 4 - If Else Statements

The If Else PHP statement is the most used statement in PHP. Hereyou will learn how to use it.

Next Page »