Haven’t read part 1 yet? Go to PART 1 else you’re good to continue!
In this tutorial we’ll be learning how to echo out an image, much advanced calculations using variables, using the IF statement and using arrays.
Ready? Good! Lets start working.
$num1 = 10;
$num2 = 2;
echo “$num1 / $num2 equals ”.$num1 / $num2
//you need to use a period in an echo function to do more than one thing
echo “$num1 + $num2 divided by $num2 is equal to ”.($num1 + $num2) / $num2;
//what we want to happen is add $num1 and $num2 and divide its answer by $num2
//if brackets are not used it will divide $num2 by $num2 and add $num1 to its answer
//you can change everything accordingly and try it out with any other symbol
?>
<?php
//if you need to create a simple log-in system
$username=“tutebox”;
$password=“abc”;
if ($username && $password)
{echo “Access granted!”;
}
else
{echo “Access denied!”;
}
//You need yo use text boxes and there’s a lot more modification required to do a nice system.
?>
- thanks for your comments
Tagged coding, PHP, programming
Dewayne MurraJuly 11, 2010 at 1:49 pm
PHP PHP PHP………. THANKS ALOT!
script manJuly 13, 2010 at 8:07 pm
Basic stuff?? these sounds very advance to me
smokeless cigarettesJuly 15, 2010 at 6:05 am
This is among the most incredible blogs Ive read in a incredibly prolonged time. The level of data in here is breathtaking, like you practically wrote the book on the subject. Your blog is excellent for anyone who wants to realize this topic a lot more. Excellent things; please keep it up!
used industrial machineryJuly 15, 2010 at 12:52 pm
A Good Read…
Very helpful info thanks…
ruzeenAugust 14, 2010 at 6:28 amAuthor
Fine; inclusive of proper reference. Peace.
SamsonJanuary 16, 2011 at 10:30 am
I would like to thank you for the time you put into this post. Your post has me eager to begin my own site now. Thanks again for taking the time to put this online.