Tag Archives: php

Web Design and Programming Pt 3 Looping

Objective C LoopingIn this web design and programming video tutorial I’ll show you how to use looping statements with PHP. If you missed the first part of this tutorial it is here Web Design and Programming.

I specifically will cover the following topics:

  • Using the $_REQUEST array to pass form data
  • The While Loop
  • The Do While Loop
  • The For Loop
  • How Break and Continue work

Continue reading Web Design and Programming Pt 3 Looping

Web Design and Programming Pt 2 PHP & HTML

Help Web Design and ProgrammingHere I continue covering Web Design and Programming using all of the most used languages being HTML, CSS, JavaScript, PHP, MySQL, etc. If you missed my first video, you should watch that first Web Design and Programming part 1.

In this specific tutorial I’ll cover the following:

  • How to access html form data with PHP
  • How to use if conditional statements in PHP
  • How to use the Switch statement in PHP
  • And more…

Continue reading Web Design and Programming Pt 2 PHP & HTML

Web Design And Programming Pt 1 PHP

Web Design and ProgrammingI have received tons of requests for tutorials. So, I’ve decided to create a massive tutorial that answers them all. In this tutorial I’ll focus on Web Design and Programming using all of the tools required. You should check out my Learn HTML Tutorial if you haven’t ahead of time.

I’ll continue this tutorial, with your input, until you can do pretty much anything in Web Design and Programming. Leave questions and comments below, because you are going to totally control everything I cover here.

I’ll start off with the basics of PHP and move on from there with tons of examples. Of course, all of the code used will follow the video.

All the Code from the Video

<html>
<head>
<title><?php echo “Website Title”;?></title>
</head>
<body>
<?php

// You can use short tags but it is not recommended doesn’t work in 6
# You can also comment code like this
/* Here is a
multiline comment
*/
echo “<p>Random Text</p>”;
print(“<p>You can print with braces</p>”);
print “<p>or without
them!</p>”;

$randVar = “Cats”;
echo “<p>”, $randVar, ” are funny</p>”;

printf(“<p>My name is %s I’m %d years old and
pi is equal to %.2f</p>”, ‘Derek’, 35, 3.14);

// Variables must start with a $ then letter or _ and then numbers
// Variables are case sensitive & don’t require definition before use

$boolEx1 = false; // 0 or false equals false
$boolEx2 = 1; // true equals any number but 0

$intEx1 = -234; // Max size normally 2^31 or 2^63

$floatEx1 = 3534.14;

echo “<p>Cost: $”,number_format($floatEx1,2), “</p>”;

// Arithmetic Operators: + – * / % ++ —

$firstName = “Doctor”;
$lastName = “Who”;

$wholeName = $firstName . ‘ ‘ . $lastName;
printf(“<p>His name is %s</p>”,$wholeName);

define(‘ACONSTANTVAR’, 2345);

echo “A constant is equal to ” . ACONSTANTVAR . “<br />”;

echo “How do quotes differ $wholeName<br />”;
echo ‘How do quotes differ $wholeName<br />’;

/* Escaped Characters in double quotes \” \’ \\ \n \r \t \$ */

$float2Int = (int) $floatEx1;
echo $float2Int, “<br />”;

/*
(array)
(bool)
(int64)
(object)
(float)
(double)
(string)
*/

$strNum = “28”;
echo $strNum * $floatEx1, “<br />”;

echo gettype($strNum), “<br />”;
echo is_string($strNum), “<br />”;

/* is_array() is_bool() is_float() is_integer() is_null() is_object()

?>
</body>
</html>

Make a Website Video Tutorial

Make a Website Video TutorialHere I have combined all of my website tutorial’s in to one place. If you want, you can learn how to design website’s, using this tutorial. There are 71 Free Video’s in all. This video provides link’s to all of the video’s through YouTube, or you can select the video you want to watch from the list below.

These tutorial’s and the code that belongs with them, is here on New Think Tank.

Continue reading Make a Website Video Tutorial