Tutorials Every Saturday

Posted by Billy | Posted in Interesting News, My Design | Posted on 29-06-2010

0

I’ve been getting requests through my email recently for tutorials. People want to know how to make web designs in Photoshop or how to make a Web form email with PHP. Every Saturday evening around 12am I’m going to be posting tutorials on web design and web development. I’ll cover languages from PHP to JavaScript to HTML and CSS, up to and including the newest technologies like CSS3 and HTML5. I’ll cover how to make web layouts in Photoshop CS5 and eventually Flash Catalyst CS5. The reason they’ll be on Saturday is because I need the evening to use my microphone. There will be a youtube channel dedicated to the tutorials, I’ll decide the name later, and it’ll be featured on this website. If you want to keep up with the tutorials and when they come out, check @Bill_Macomber on twitter for more information.

Adobe Suites

Adobe Suites

Square Root PHP Web App Tutorial

Posted by Billy | Posted in My Design | Posted on 31-03-2010

0

I decided to take a one day break from designing stuff to design a simple, one line of code, PHP web app. Check out the final result at http://guitarcentral.macabreink.com/tutorials/index.html . Let’s start with the HTML, if you haven’t seen my HTML tutorials, check them out here.

Let’s break this down piece by piece. Starting with the block of code here:

HTML:

<form method=”post” action=”sqrt.php”>
<label>Enter number here</label>&nbsp;<input type=”text” id=”square” name=”square” />
<input type=”submit” value=”Submit” />
</form>

If you looked at the HTML tutorial you know we used the id of square to identify the text form element so we can grab it with our sleek and smexy PHP script you’ll see below. The submit just makes a submit button.

PHP:

<?php
echo sqrt($_POST['square']);
?>

The <?php ?> tags open and close blocks of PHP code. The echo block will print the line of code onto the screen. The big part of this code is the $_POST['square']. This snippet of code grabs the form field with the id of square and processes it in the PHP file. Sqrt squares the value that $_POST['square'] grabbed. So if you type 4 into the text field $_POST['square'] will grab the 4 and sqrt() will square the four and echo will print the value of 2 since 2 is the square root of 4.

That’s it, as I make more of these they’ll get easier to understand and follow but this is the beginning (even though you’ll find some other PHP tutorials on my website). Keep watch for tutorials on Javascript and PHP loops and how to use them without killing other people’s computers or your own.