School Map:  Home / Enroll $ Student Records; Class  
$ News @ LIVE Tech Radio * Support/FAQ | Store | FORUMS

Class / Forums / php101 Refresh the current page Post your Week #1 TO-Do Assignment Here
 

 (#1 2003-08-07 15:30:59) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Welcome to the PHP Basics for Webmasters Course Week #1.

Your Week #1 Basic TO-DO assignment should be posted here in this thread only. If you have specific questions about the week 1 course text then please also post them in this thread so that other students can learn from the information.

Here is the details on what you need to do in this assignment:

TO-DO ASSIGNMENT #1: Write a script to store and print your name (nick) and at least one favorite url to the browser using variables to assign them. Make the variable names conform to the rules explained above and use comments in the code explaining each line of code. Cut and paste your code to the Week 1 forum HERE (hit reply to this message to post your code) to share with others.

 

 (#31 2003-08-08 08:41:55) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Are you enrolled as a Script School student? If you aren't then please visit: http://www.scriptschool.com/enroll.phtml to enroll.

Once enrolled, login and you can turn in your assignment here.

Some students might have woken up and said: what happened to all the other turned in assignments? We'll be covering that in the student newsletter and on the radio show today.

For those just getting started, I realize it is helpful to review assignments turned in by other students. Here is one imported page of the archives from the prior 3 years week #1 to-do assignments (you must be enrolled as a student and logged in to see the following page):
http://class.scriptschool.com/...basic_1-1.phtml

Hopefully you'll be able to tune in to today's show to find out what's happening, as well as get started on the new MySQL course which is being officially launched today.

Happy coding to you!

 

 (#32 2003-08-08 11:00:35) Post Reply
Page 0 1 2 3 4 5 6 7 8

Donnie
Need To Set


Enrolled: Aug 2003
Posts: 41
AP: 1

I finished the week #1 To-Do Assignment. It works! Any suggestions on improvements?

<HTML>
<HEAD>
<TITLE>SchoolScript.com Assignment 1</TITLE>
</HEAD>
<BODY>
<?php
// This program will use php to display my name and website using variables.
// Assign the variables.
$firstname = "Donnie";
$lastname = "Autry";
$website = "http://www.dandrenterprises.com";
// Display information in browser.
print ("Hello, my name is $firstname $lastname.<br>My favorite website is $website.");
// Print the current date.
print ("<br>The current date is: " . date("m/j/y"))
?>
</BODY>
</HTML>


 

 (#34 2003-08-08 13:12:49) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Hi Donnie, you can wrap your code around VBulletin-style code tags (see the posting form) and it will look like this:



<HTML>
<HEAD>
<TITLE>SchoolScript.com Assignment 1</TITLE>
</HEAD>
<BODY>
<?php
// This program will use php to display my name and website using variables.
// Assign the variables.
$firstname='Donnie';
$lastname='Autry';
$website='http://www.dandrenterprises.com';
// Display information in browser.
print("Hello,mynameis$firstname$lastname.<br>Myfavoritewebsiteis$website.");
// Print the current date.
print("<br>The current date is: ".date("m/j/y"))
?>
</BODY>
</HTML>



Notice that I edited the variable assignments to be single quotes (literal), not double quotes (interpreted). Not neccesary for interpreted in the example above.

 

 (#52 2003-08-16 15:43:35) Post Reply
Page 0 1 2 3 4 5 6 7 8

Sk8rRIMuk
Need To Set


Enrolled: Aug 2003
Posts: 39
AP: 1

[code]<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DT...itional.dtd>
<html>
<head>
<title>Craig Guest's Profile</title>
<meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 />
</head>
<body>
<center>
<?php
//This script is made to display informaiton about me via assigned variables
//Stored details in the variables
$firstname='Craig';
$middlename='Jonothan';
$surname='Guest';
$nick='Sk8rRIMuk';
$email='<a href="mailto:sk8rrimuk@hotmail.com">sk8rrimuk@hotmail.com</a>';
$site='<a href="http://www.katikai.com/ee" target="_blank">www.katikai.com/ee</a>';
//Print My Details
print(Hello my name is $firstname $middlename $surname.<br />My nickname is $nick.
<br />My e-mail is $email.<br />My website is $site.);
?>
</center>
</body>
</html>[/code]

OK I got it working and this is my final verison :D hope you like :P.

 

 (#54 2003-08-17 16:32:16) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Sk8rRIMuk - there was a bug with the code conversion routine in the forum which I just fixed. Please repost using [ code ] and [ /code ] (but with no spaces) and don't use the preview function (I'm going to remove that for the time being.

I'll delete your other posts, per your request

 

 (#55 2003-08-17 18:05:10) Post Reply
Page 0 1 2 3 4 5 6 7 8

Sk8rRIMuk
Need To Set


Enrolled: Aug 2003
Posts: 39
AP: 1


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Craig Guest's Profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<center>
<?php
//This script is made to display informaiton about me via assigned variables
//Stored details in the variables
$firstname='Craig';
$middlename='Jonothan';
$surname='Guest';
$nick='Sk8rRIMuk';
$email='<a href="mailto:sk8rrimuk@hotmail.com">sk8rrimuk@hotmail.com</a>';
$site='<a href="http://www.katikai.com/ee" target="_blank">www.katikai.com/ee</a>';
//Print My Details
print("Hellomynameis$firstname$middlename$surname.<br/>Mynicknameis$nick.
<br/>Mye-mailis$email.<br/>Mywebsiteis$site."
);
?>
</center>
</body>
</html>


 

 (#72 2003-08-20 03:41:23) Post Reply
Page 0 1 2 3 4 5 6 7 8

MasterD
Need To Set


Enrolled: Aug 2003
Posts: 10
AP: 1

<?php
//Variable
$site = "<a href='http://www.-devil.tk'> -Devil.tk </a>";
/* It's better then echo'ing hello world :)*/
$nick = "Master-Devil";

print "Hello, my name is Pascal Bakhuis known on the net as $nick,
<br /> I'm trying to learn php so that I can improve my site located here $site";
?>

Finally no <?php echo = "Hello world!"; ?> I was getting rather sick of that.. I like the first lesson here, very nice to give assignments.

Request: Some more freedom in names ? I couldn't even make my beloved "Master-Devil" nick :(

 

 (#91 2003-08-25 20:45:11) Post Reply
Page 0 1 2 3 4 5 6 7 8

jthwalker
Need To Set


Enrolled: Aug 2003
Posts: 2
AP: 1

<?
/*My name string*/
$name="Jonathan Thomas Hensley";
/*my favorite address string*/
$bookmark="http://www.sosaenterprises.com";
/*My name argument*/
print("My name is $name. ");
//My favorite site argument
print("$name's favorite site is $bookmark");
?>

 

 (#92 2003-08-25 21:42:43) Post Reply
Page 0 1 2 3 4 5 6 7 8

Punch
Need To Set


Enrolled: Aug 2003
Posts: 1
AP: 1

<html>
<head>
<title>Learning PHP</title></head>
<body>
<?php
// A string of my first name along with various other things that could be used to code my site and teach PHP
$first='Glenn'
$last='Deckelmann'
$nickname='Punch'
$email='<a href="mailto:gdeckjr@cox.net">gdeckjr@cox.net</a>'
$favoritesite='<a href="http://www.wrassle.net/wrassle2k" target='parent'>Wrassle[Dot]Net</a>'
//Printing a short biography using above strings
print("Hello, children. My name is $first $last. Around school I am known as $nickname. I got the name during school, thanks to a good bud of mine. If you would like to contact me, you can do so at this address. $email I spend a lot of my online time here as well $favoritesite.");
?>
</body>
</html>

 

 (#93 2003-08-26 02:05:49) Post Reply
Page 0 1 2 3 4 5 6 7 8

KPHP
Need To Set


Enrolled: Aug 2003
Posts: 1
AP: 1

Dear Sir,

I am very proud to have myself on a way to learn from a great personality like you.

Actually I have done my asssignment, please give your comments:

<html>
<head>
<title> <?php echo "My first PHP page"?>
</title>
</head>
<body>

<?php
$myname="KPHP"; /*Declares name varibale and stores value*/
$favwebsite="http://www.scriptschool.com"; /*Declares favortie site varibale and stores the URL*/

print("My name is $myname <br> and my favorite site is $favwebsite");

/*Print the results*/
?>

</body>

</html>

 

 (#96 2003-08-27 09:40:01) Post Reply
Page 0 1 2 3 4 5 6 7 8

cashpath
Need To Set


Enrolled: Aug 2003
Posts: 13
AP: 1

<?
$myname = "Jay";
$url1 = "http://www.browseseek.com";
$url2 = "http://www.maddenboard.com";
$url3 = "http://www.hizzle.com";
$url4 = "http://www.autosurfusa.com";
$url5 = "http://www.surflist.com";
$url6 = "http://www.theautosurfer.com";

print("My name is $myname <br>");
print("My six Favorite URL's are <br> $url1 <br> $url2 <br> $url3 <br> $url4 <br> $url5 <br> $url6");
?>

 

 (#119 2003-08-28 20:53:29) Post Reply
Page 0 1 2 3 4 5 6 7 8

TecBrat
Need To Set


Enrolled: Aug 2003
Posts: 6
AP: 1

Here it is, plain and simple.

<?
$name = "Corry"; //first name
$nick = "TecBrat"; // Internet id
$site = "http://www.yahoo.com"; // where I start
Print("name $name<br>"); // tell you about it
Print("nick $nick<br>"); // tell you some more
Print("site $site<br>"); // and tell you yet again.
?>

 

 (#134 2003-08-29 21:43:16) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Welcome cashpath and tecbrat. Be sure to use the code tags when posting so the code is colorized by the script. I've just made some modifications to make sure slashes show where they are supposed to go.

Nice to have you with us ;)

 

 (#135 2003-08-29 21:48:18) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Welcome to the course jthwalker, Punch, KPHP :)

Re #91 - jthwalker
recommend using <?php instead of <? these days. I realize the course code shows the one you used, but that will be updated in the next revision of the course material.

Re #92 - Punch
"parent" should technically be "_parent"

Re #93 - KPHP
same comments as #91 above ... you are on your way ;)

 

 (#137 2003-08-31 19:51:43) Post Reply
Page 0 1 2 3 4 5 6 7 8

galacey
Need To Set


Enrolled: Aug 2003
Posts: 7
AP: 1



<?
//assign my name to a variable
$my_name="Gary Lacey";
//assign my favourite url to a variable
$my_favourite_url="http://www.money-maker.co.uk";
//print the variables to the screen
print("My name is ");
print(
$my_name);
print(
", my favourite web site is ");
print(
$my_favourite_url);
?>



 

 (#142 2003-09-01 10:32:01) Post Reply
Page 0 1 2 3 4 5 6 7 8

Nazz
Need To Set


Enrolled: Aug 2003
Posts: 8
AP: 1

Ok finally I'm set up and here is the first assignment.
<HTML>
<HEAD>
<TITLE>Nazz's First Assignment</TITLE>
</HEAD>
<BODY>
<center> Nazz's First Assignment.<br>
<?php
// This php script will display my name and website.
// Assign variables.
$firstname = "Dave";
$nickname = "Nazz";
$website = "http://smr.fem.tu-ilmenau.de/login.php";
// print to browser.
print ("Hello, my name is $firstname.<br>My nickname is $nickname.<br>My favorite website is $website.");
?>
</BODY>
</HTML>

 

 (#143 2003-09-01 10:42:41) Post Reply
Page 0 1 2 3 4 5 6 7 8

Nazz
Need To Set


Enrolled: Aug 2003
Posts: 8
AP: 1

Ok finally I'm set up and here is the first assignment.
<HTML>
<HEAD>
<TITLE>Nazz's First Assignment</TITLE>
</HEAD>
<BODY>
<center> Nazz's First Assignment.<br>
<?php
// This php script will display my name and website.
// Assign variables.
$firstname = "Dave";
$nickname = "Nazz";
$website = "http://smr.fem.tu-ilmenau.de/login.php";
// print to browser.
print ("Hello, my name is $firstname.<br>My nickname is $nickname.<br>My favorite website is $website.");
?>
</BODY>
</HTML>

 

 (#144 2003-09-01 10:43:16) Post Reply
Page 0 1 2 3 4 5 6 7 8

Nazz
Need To Set


Enrolled: Aug 2003
Posts: 8
AP: 1

Ok finally I'm set up and here is the first assignment.
<HTML>
<HEAD>
<TITLE>Nazz's First Assignment</TITLE>
</HEAD>
<BODY>
<center> Nazz's First Assignment.<br>
<?php
// This php script will display my name and website.
// Assign variables.
$firstname = "Dave";
$nickname = "Nazz";
$website = "http://smr.fem.tu-ilmenau.de/login.php";
// print to browser.
print ("Hello, my name is $firstname.<br>My nickname is $nickname.<br>My favorite website is $website.");
?>
</BODY>
</HTML>

 

 (#148 2003-09-02 04:35:26) Post Reply
Page 0 1 2 3 4 5 6 7 8

freak
Need To Set


Enrolled: Sep 2003
Posts: 3
AP: 1

Thank David for making this possible :)



<html>
<head>
<title>My First Assignment</title>
</head>
<body>
<?php // starting php code
$nickname =freak; // declares a varibale $nickname and stores my nickname in it
$website=http://www.scriptschool.com; // declares a variable $website and stores my favorite webste in it
print(Hello, my name is $nickname and my favorite website is $website); // prints the text to the screen
?>
</body>
</html>


 

 (#149 2003-09-02 04:38:06) Post Reply
Page 0 1 2 3 4 5 6 7 8

freak
Need To Set


Enrolled: Sep 2003
Posts: 3
AP: 1

<html>
<head>
<title>My First Assignment</title>
</head>
<body>
<?php // starting php code
$nickname = "freak"; // declares a varibale $nickname and stores my nickname in it
$website= "http://www.scriptschool.com"; // declares a variable $website and stores my favorite webste in it
print("Hello, my name is $nickname and my favorite website is $website"); // prints the text to the screen
?>
</body>
</html>

 

 (#161 2003-09-06 13:15:07) Post Reply
Page 0 1 2 3 4 5 6 7 8

operations
Need To Set


Enrolled: Sep 2003
Posts: 8
AP: 1



<TITLE>Script School Assignment 1</TITLE>
<center>
<?php
/* TO-DO ASSIGNMENT: Write a script to store and print your name (nick) and at least one favorite url
* to the browser using variables, use comments and variable names which conform to the course discussion.
*
* The variables go here
* First the comments */

$my_name = "Hi, I'm ";
$site1 = "My favorite site is ";
$site1a = "it's the site I use the most :)";
$site2 = "And my 2nd favorite Site is ";

//My details

$name ="Operations";
$fav_url1 = '<a href="http://www.google.co.uk">Google UK</a>';
$fav_url2 = '<a href="http://futuremark.com/">Futuremark</a>';


//What you see in the browser goes here

Print("$my_name $name <br> $site1 $fav_url1 $site1a <br> $site2 $fav_url2");

?>



 

 (#165 2003-09-09 07:39:25) Post Reply
Page 0 1 2 3 4 5 6 7 8

Quicksaver
Need To Set


Enrolled: Sep 2003
Posts: 90
AP: 1

just to let you know that this is not very new for me, I done my way to the 6th course a couple months ago but i had to go on vacations so im just checking if i still "own" mah lil portion of php so i can resume where i stopped :P, actually just with this review of the first task i remembered quite a lot from the rest. anyway just to tell the people who are just starting, dont give it up at the begining, its well worth it at the end :)

<? //start the code
$nick = "Quicksaver"; //set my name
$url = "<a href=\"http://www.scriptschool.com\">ScriptSchool</a>"; //set favourite url

//command to print on the screen my message
print("Hi y'all, my name's $nick and I think $url is the best there is.");

//end the code
?>

working url

 

 (#166 2003-09-09 07:41:31) Post Reply
Page 0 1 2 3 4 5 6 7 8

Quicksaver
Need To Set


Enrolled: Sep 2003
Posts: 90
AP: 1

yeahyeahyeah i forgot i can use the code and /code, i forgot, hope no harm on that :)

 

 (#193 2003-09-11 11:24:22) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Welcome to the course Quicksaver

 

 (#203 2003-09-14 16:40:45) Post Reply
Page 0 1 2 3 4 5 6 7 8

Cooltude
Need To Set


Enrolled: Sep 2003
Posts: 1
AP: 1



Hi all, new to the course here. I don't have a programming background per se but I pick things up fairly quickly. Hope I can keep up.

Week 1 To-do
--------------
<?php
// store variables
$name1='Cooltude';
$url1='<a href="www.scriptschool.com">ScriptSchool</a>';
// HTML and variable assignment result
print ("My name is $name1 and my Fav site is $url1");
?>



 

 (#204 2003-09-15 07:12:34) Post Reply
Page 0 1 2 3 4 5 6 7 8

Shrek
Need To Set


Enrolled: Aug 2003
Posts: 33
AP: 1

<Title>Assignment 01 Script School</title>
<?
// Just a simple assignment

$myname="jeffkwan";
$myurl="http://jeffkwan.blogspot.com";

printf("Hi, Every One. My Name is $myname <br>");
printf("My Favourite Website is $myurl ");
printf("<a href=$myurl>Link</a>");
?>

 

 (#232 2003-09-17 13:05:34) Post Reply
Page 0 1 2 3 4 5 6 7 8

TDavid
php mySQL Perl C/C++
Principal


Enrolled: Mar 2000
Posts: 193
AP: 1

Welcome shrek and Cooltude to the PHP Course. This course will be getting updated next as we just finished up with the launch of the MySQL course.

This shouldn't prevent anybody from getting started with this course, though, as the modifications are likely not going to change the course to-do assignments. Significantly, anyway.

Watch your email box for the student newsletter (which hasn't been sent for a month or so) for further details.

 

 (#249 2003-09-18 23:52:19) Post Reply
Page 0 1 2 3 4 5 6 7 8

merlin69
Need To Set


Enrolled: Sep 2003
Posts: 4
AP: 1


<HTML>
<HEAD>
<TITLE>Merlins week 0ne assignment</TITLE>
</HEAD>
<BODY>
<?php
// asigning variables
$firstname="Tony";
$lastname="Corbett";
$nickname="Merlin69";
$website="http://www.ebay.com";
//print to browser window using print string functions
print("Hello, I am $firstname $lastname <br> my nickname is $nickname<br>One of my favorite websites is $website.");
?>
</body>
</html>
[/code/


 

 (#253 2003-09-19 21:41:31) Post Reply
Page 0 1 2 3 4 5 6 7 8

Len
Need To Set


Enrolled: Sep 2003
Posts: 1
AP: 1

<?
$myname = "My name is Len";
$my_website = "My URL is http://www.phpcat.com";
print($myname);
print"<BR>";
print($my_website);
?>

 

  Page 0 1 2 3 4 5 6 7 8

View Previous Thread
Print this page Print This Page

View Next Thread

School Map:  Home / Enroll $ Student Records; Class  
$ News @ LIVE Tech Radio * Support/FAQ | Store

Advertising | Link To Us | Privacy 
Copyright 2000-2002 Script School Productions / KMR Enterprises 
No part of this website may be reproduced, copied and/or distributed in any medium 
without express written permission