PHP Basics In Pictures
Basics
Variables
Numbers
User functions
Logic & Loops
Files
Using the text editor, create a new script with this code:
<?php
$cars_on_lot = 100;
$deal_of_day = "Nissan Maxima";
$pic_of_day = "http://www.yourwebsite.com/maxima.jpg";
print "<p>Welcome to <b>ACME AUTO!</b></p>\n";
print "<p>Which one of our $cars_on_lot cars is right for you?</p>\n";
print "<p>Today we have a <b>GREAT</b> deal on a $deal_of_day car:</p>\n";
print "<img src="$pic_of_day">\n";
?>
TIP:
Remember to change the
www.yourwebsite.com
address in
$pic_of_day = "http://www.yourwebsite.com/maxima.jpg"
to your actual Web site address.
<< BACK
NEXT >>