Category Archives: Web Design

Design To Website, Blog How To Set Up, Google Update Pagerank, Google Crawl, Free Submit Site

JavaScript Video Tutorial Pt 4

Javascript Video TutorialIn this JavaScript video tutorial I spend some time explaining the complexity of using Arrays and Functions in JavaScript. If you missed part 1, watch that first JavaScript Video Tutorial.

JavaScript Arrays are different from many languages because you can pretty much throw anything in them. This is because JavaScript isn’t strongly typed once again.

JavaScript Functions are also odd because they don’t follow the normal scoping rules used in most other languages. And, did you know you can completely disregard the number of arguments a function will accept? You’ll learn this plus how to:

Continue reading JavaScript Video Tutorial Pt 4

JavaScript Video Tutorial Pt 3

JavaScript OOPIn this JavaScript Video Tutorial I will completely cover JavaScript Object Oriented Programming. If you haven’t watch part 1 of this tutorial first JavaScript Video Tutorial.

OOP in JavaScript works differently from other languages. Because JavaScript is loosely typed (datatypes don’t have to be explicitly stated) you are unable to implement certain OOP concepts in JavaScript. You can however take advantage of many of the positives obtained through the use of OOP using JavaScript.

Continue reading JavaScript Video Tutorial Pt 3

JavaScript Video Tutorial Pt 2

JavaScript EventsIn this video tutorial I cover numerous techniques that can be implemented by monitoring events. If you missed part 1 watch it first JavaScript Video Tutorial.

This video is both a review of what you were taught in part 1, but also you’ll learn:

  • Every Single Event in JavaScript
  • How to Create Inline JavaScript
  • How to Change CSS Styling on Anything Dynamically
  • Change Elements or Delete them Completely
  • Monitor Every Mouse Movement and Key Press Dynamically

And, numerous other things. All of the code follows the video. If you have any questions or comments, leave them below.

Code From the Video

JavaScript Video Tutorial

Learn JavaScriptIn this JavaScript Video Tutorial I’ll teach you all of the core knowledge needed to write JavaScript code in 30 minutes. I’ve never seen a tutorial like this and was interested in whether you all would like to see more tutorials like this?

I specifically cover the following topics:

  • JavaScript Datatypes
  • Embedding JavaScript
  • Linking to JavaScript
  • Conditional Statements
  • Looping
  • Arrays
  • Strings
  • Functions

And, a great deal more along the way. If you’d like to read this information in a slower for see JavaScript Scripting. I also created another JavaScript tutorial that also proceeds at a slower pace if you’d like to check that out Learn JavaScript.

All of the code used follows the video. Leave any questions or comments below 🙂

[adsense]

Code From the Video

Website Layouts with CSS

CSS Website LayoutsIn this CSS Video Tutorial I’ll show you how to layout a whole web page using Cascading Style Sheets. I’ll create headers, content areas, footers and numerous sidebars. I’ll also show you how to make major changes to a website layout with a limited amount of coding.

If you’d prefer to read this information in an article see this CSS Layout and Positioning.

All of the code used can be found in the article above and also follows the video tutorial. If you have any questions or comments leave them below. You can use the code in any way that you wish.

Continue reading Website Layouts with CSS

CSS Video Tutorial Pt 3

CSS Video TutorialIn this tutorial I’ll cover most every Cascading Style Sheet property not covered in CSS Tutorial Pt 1 and CSS Text Properties. Specifically I’ll show you how to style:

  • Backgrounds
  • Tables
  • Lists
  • Cursors

I’ll also introduce you to the box element and its numerous properties. If you’d prefer to read this information please see Learn CSS.

Continue reading CSS Video Tutorial Pt 3

CSS Video Tutorial

CSS Video TutorialIn this video tutorial I will begin going over every way you can style your web pages using Cascading Style Sheets (CSS). I specifically cover in this CSS Video Tutorial how to:

  • Link to External Style Sheets
  • Embed Style Sheet Definitions in HTML
  • What they Mean by Cascading
  • How CSS’s Work Differently with Inline versus Block Elements
  • How to Define Style Elements

Continue reading CSS Video Tutorial

PHP Message Board Pt 1

MySQL LogoI show you how to create a PHP / MySQL message board in this video tutorial. I start by showing you how to properly set up the database. this can be looked at as a review on how to write SQL as well.

I specifically will review how to:

  • Create Databases
  • Create Tables and the Data Contained in them
  • Use the Insert Command
  • Use the Alter Command

Continue reading PHP Message Board Pt 1

Learn xHTML in 10 Minutes

Learn xHTML Video TutorialIn the last article I covered how to Learn HTML in 15 minutes. In this video I’ll teach you how to write xHTML 1.0 Strict code in 1o minutes!

It is actually pretty easy. You just have to:

  • Change your DOCTYPE
  • Change Some Meta Tags
  • Close all your tags properly
  • Surround inline tags with block tags
  • Eliminate the use of a few tags
  • Leave the styling to Cascading Style Sheets

Continue reading Learn xHTML in 10 Minutes

Learn HTML Video Tutorial

Learn HTMLI was dared to create an HTML video tutorial that covers the top 50 tags, in under 15 minutes. Well I did it!

I show how to use 50 different tags in HTML. I then give an example of each. You’ll either love it or hate it. I hope you love it of course.

If you would prefer to see this done more slowly check out Learn HTML. I go through everything much slower and provide examples as well.

I plan on covering JavaScript next and then moving back into the wonderful world of PHP and then everything WordPress Themes & Plugins.

The code used in the video follows the video. Leave questions or comments below.

Code From the Video

MAIL2.PHP

<! DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

<html>

<head>

<meta http-equiv=”Content-Type” content=”text/html;charset=ISO-8859-1″ />

<style type=”text/css”>

h1 {color:red}

</style>

<meta name=”description” content=”Welcome to Bob’s Hardware, We sell” />

<meta name=”keywords” content=”Flowers, Seeds, Rakes, Shovels, Hardware Store” />

<meta name=”author” content=”Bob Smith” />

<title>Welcome to Bob’s Hardware Store, we sell Flowers, Seeds, Rakes</title>

</head>

<body>

<h1>Text to Draw Attention to</h1>

<abbr title=”A much longer description”>Something Abbreviated</abbr>

<acronym title=”as soon as possible”>ASAP</acronym>

<b>I Want this to be Bold</b>

<big>This is going to be Big</big>

<blockquote>Indent me and show I’m important</blockquote>

<center>Center Me Please</center>

<em>I like Being Italicized</em>

<i>I like being Italicized too</i>

<p>This is a big paragraph. Really, it is!</p>

<q>You can quote me on that</q>

<s>I’ve been struck</s>

<small>I feel so small</small>

<strong>I’m the strongest</strong>

<sub>I’m Subscript</sub>

<sup>I’m Superscript</sup>

<img src=”http://www.newthinktank.com/wp-content/uploads/2010/03/marketing-examples45_sm_sm.jpg” alt=”Merrill Lynch Ad” height=”415″ width=”300″/>

<dl>

<dt>Bicycle</dt>

<dd>- Has two Wheels</dd>

<dt>Car</dt>

<dd>- Has Four Wheels</dd>

</dl>

<ol>

<li>Car</li>

<li>Truck</li>

<li>Bicycle</li>

</ol>

<ul>

<li>Car</li>

<li>Truck</li>

<li>Bicycle</li>

</ul>

<a href=”http://www.newthinktank.com” target=”_blank”>The New Think Tank Website</a>

<a href=”http://www.newthinktank.com#Great Stuff”>Some Great Stuff</a>

<a href=”mailto:derekbanas@example.com?Subject=Hello%20again”>Send Mail</a>

<table summary=”Here is my sample table and a description of what it’s about”>

<caption>

Here are some things I did

</caption>

<tr>

<th>Sat</th>

<th>Sun</th>

<th>Mon</th>

</tr>

<tr>

<td>Played Ball</td>

<td>Watched Football</td>

<td>Worked</td>

</tr>

</table>

<form action=”http://www.newthinktank.com/mail2.php” method=”post”>

<b>Send Message to this Email</b><br />
<input type=”text” name=”email” size=40><br />

<p><b>Subject</b><br />
<input type=”text” name=”subject” size=40></p><br />

<p><b>Text Area</b><br />
<textarea cols=40 rows=10 name=”message”>Default Text in Text Area Box</textarea></p><br />

<p><b>Text Input</b><br />
<input type=”text” name=”textinput” /></p><br />

<p><b>Password Input</b><br />
<input type=”password” name=”password” /></p><br />

<p><b>Radio Input</b><br />
<input type=”radio” name=”radioinput” value=”Love Radio Buttons” />Love Radio Buttons
<input type=”radio” name=”radioinput” value=”Hate Radio Buttons” />Hate Radio Buttons</p><br />

<p><b>Checkbox Input</b><br />
<input type=”checkbox” name=”checkboxinput” value=”Love Checkboxs” />Love Checkboxs
<input type=”checkbox” name=”checkboxinput” value=”Hate Checkboxs” />Hate Checkboxs</p><br />

<p><b>Select Input</b><br />
<select name=”selectinput”>
<option value=”loveselect”>I love select buttons</option>
<option value=”hateselect”>I hate select buttons</option>
</select></p><br />

<p><b>Option Input</b><br />
<select name=”optioninput”>
<option value=”loveselect”>I love option buttons</option>
<option value=”hateselect”>I hate option buttons</option>
</select></p><br />

<p><input type=”submit” value=”Send”></p>

<input type=”hidden” name=”submitted” value=”TRUE” />

</form>

</body>

</html>

Web Design and Programming Pt 24

Regex TutorialIn todays Programming tutorial I show you how to grab information from a website using Regular Expressions in PHP. The information was particularly hard to get for the following reasons:

  • It was plain text
  • There were no tags to search for
  • Data I wanted was laid out in an unorganized way
  • I had to search for odd unicode characters like ½

I did it though using Regular Expressions and I’ll show you how.

Continue reading Web Design and Programming Pt 24

Web Design and Programming Pt 23

PHP Forgot Password ScriptIn this web design and programming video tutorial I’ll show you how to make a secure forgotten password script. These scripts are attacked more than mosts and normally are full of security flaws.

I specifically cover how to:

  • Strip dangerous code from user input using Regular Expressions
  • Enforce secure security questions
  • Avoid brute force attacks with CAPTCHA systems
  • Create secure encrypted temporary passwords
  • Mail new passwords

All of the code used will follow the video. If you have any questions or comments leave them below.

If you have a recommendation for a future tutorial leave that below as well 🙂

Code From the Video

<?php
session_start();
require_once(“./includes/confighamdb.php”);
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” lang=”en” xml:lang=”en”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″ />
<title>Forgot My Password</title>
</head>
<body>
<div id=”main”>
<?php
if (isset($_POST[‘submitted’])) { // Handle the form.
// Check for a valid User ID
if (preg_match (‘%^[A-Za-z0-9]{8,20}$%’, stripslashes(trim($_POST[‘userid’])))) {
$u = escape_data($_POST[‘userid’]);
} else {
$u = FALSE;
echo ‘<p><font color=”red” size=”+1″>1Information Entered is Wrong</font></p>’;
}
// Check for valid Mother name
if (preg_match (‘%^[A-Za-z]{6,25}$%’, stripslashes(trim($_POST[‘mothername’])))) {
$sq = escape_data($_POST[‘mothername’]);
} else {
$sq = FALSE;
echo ‘<p><font color=”red” size=”+1″>2Information Entered is Wrong</font></p>’;
}
// PHP Code for the CAPTCHA System
$captchchk = 1;
require_once(‘./includes/recaptchalib.php’);
$privatekey = “privatekey”;
$resp = recaptcha_check_answer ($privatekey,
$_SERVER[“REMOTE_ADDR”],
$_POST[“recaptcha_challenge_field”],
$_POST[“recaptcha_response_field”]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
echo ‘<p><font color=”red” size=”+1″>The CAPTCHA Code wasn\’t entered correctly!</font></p>’;
$captchchk = 0;
}
if ($u && $sq && $captchchk) {
// Check the account information
$query = “SELECT secques, email, userid FROM users WHERE userid=’$u'”;
$result = mysql_query ($query) or trigger_error(“Security Answer was Wrong”);
if (mysql_affected_rows() == 1) {
$row = mysql_fetch_array ($result, MYSQL_NUM);
mysql_free_result($result);
if($sq == $row[0])
{
$email = $row[1];
$p = substr ( md5(uniqid(rand(),1)), 3, 10);
$query2 = “UPDATE users SET pass=SHA(‘$p’) WHERE userid=’$u'”;
$result2 = mysql_query ($query2) or trigger_error(“Your Password Couldn’t be changed. Try later.”);
if (mysql_affected_rows() == 1) { // If it ran OK.
$body = “Your password has been temporarily changed to ‘$p’. Please log in using this password and your username. At that time you may change your password to something more familiar.”;
mail ($email, ‘Your temporary password.’, $body, ‘From: admin@sitename.com’);
echo ‘<h3>Your password has been changed. You will receive the new, temporary password at the email address with which you registered. Once you have logged in with this password, you may change it by clicking on the “Change Password” link.</h3>’;
mysql_close();
exit();
}
else {
echo “Security Answer was Wrong”;
mysql_close();
exit();
}
} else { // If it did not run OK.
echo ‘<p><font color=”red” size=”+1″>Your password could not be changed due to a system error. We apologize for any inconvenience.</font></p>’;
mysql_close();
exit();
}
} else { // Failed the validation test.
echo ‘<p><font color=”red” size=”+1″>Please try again.</font></p>’;
mysql_close();
exit();
}
}} // End of the main Submit conditional.
?>
<h1>Reset Your Password</h1>
<p>Enter the Following Information Below and your Password will be Reset.</p>
<form action=”forgot_password.php” method=”post”>
<fieldset>
<p><b>Userid:</b> <input type=”text” name=”userid” size=”20″ maxlength=”20″/></p>
<p><b>Mothers or Grandmothers Maiden Name:</b> <input type=”text” name=”mothername” size=”25″ maxlength=”25″/></p>
<?php
require_once(‘./includes/recaptchalib.php’);
$publickey = “publickey”; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>
</fieldset>
<div align=”center”><input type=”submit” name=”submit” value=”Reset My Password” /></div>
<input type=”hidden” name=”submitted” value=”TRUE” />
</form>
</div>
</body>
</html>


PHP Security Pt 6 Directory Traversal

Directory TraversalIn part 6 of my PHP Security video tutorial I cover a ton of ways hackers attack and how to hold them off. If you missed previous tutorials please watch them first. Here is the first one PHP Security.

In this specific tutorial I will cover:

  • How Spammers take over Comment Boxes
  • The Dangers of Providing Access to your Insert, Delete and Update SQL Querys
  • How Hackers use include and require to attack your site
  • The Damage that can be Done by Directory Traversal
  • How to Stop Directory Traversal Attacks

Continue reading PHP Security Pt 6 Directory Traversal

PHP Security Pt 5 SQL Injection

SQL InjectionA few months ago a friend asked me to take a look at their website because they had been receiving an immense amount of spam. Worse yet they were also receiving threats from others to stop sending spam to them. I immediately knew they were being targeted by code injection, but as I dug around I found more danger than I was expecting.

It seems that their grandchild (No doubt a future Mark Zuckerberg) had created the shopping cart for them. The shopping cart application had little to know security. In seconds I was able to dump all of their customers credit card information on to the screen before their frightened eyes.

Continue reading PHP Security Pt 5 SQL Injection

PHP Security Pt 4 Set Up Captcha

PHP Set Up CaptchaIn this video / article on PHP Security I will show you how to create more secure new user registration scripts. I’ll show you how to:

  • Fight off SQL Injection by thinking about your queries
  • Set up a CAPTCHA system that will protect you from brute force attacks
  • Lock down authentication hacks by forcing proper user ids and passwords

Continue reading PHP Security Pt 4 Set Up Captcha

Web Design and Programming Pt 20

Black BoardIn this part of the Web Design and Programming Tutorial I will review how to use 3 global storage arrays available in PHP. Specifically in this video I’ll show you how to use:

  • Cookies: A storage array that you save on the clients computer. You access it by referring to $_COOKIE
  • Sessions: A storage array that you save on the server. It is accessed by referring to $_SESSION
  • Server Global: An array that contains info on your server and the client machine. You access it by referring to $_SERVER

Continue reading Web Design and Programming Pt 20

PHP Security Pt 3

Web Design and ProgrammingIn part 3 of my PHP Security video tutorial I go over the most vulnerable ways hackers attack websites. I focus a lot on authentication and client side attacks. Specifically I go over the tools and techniques used to:

  • Crack user ids and passwords
  • Catch and manipulate data sent from the browser to the server
  • Cheat encryption techniques
  • Down load and change how websites secure themselves
  • Cheat forgotten password scripts into giving up passwords

Continue reading PHP Security Pt 3