School Map:
Home / Enroll
$ Student Records; Class
$ News @ LIVE
Tech Radio * Support/FAQ
| Store | FORUMS
Class / Forums / php101 ![]() |
Post your Week #1 TO-Do Assignment Here |
|
TDavid
|
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.
|
|
TDavid
|
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! |
|
Donnie
|
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> |
|
TDavid
|
Hi Donnie, you can wrap your code around VBulletin-style code tags (see the posting form) and it will look like this:
Notice that I edited the variable assignments to be single quotes (literal), not double quotes (interpreted). Not neccesary for interpreted in the example above. |
|
Sk8rRIMuk
|
[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. |
|
TDavid
|
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 |
|
Sk8rRIMuk
|
|
|
MasterD
|
<?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 :( |
|
jthwalker
|
<?
/*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"); ?> |
|
Punch
|
<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> |
|
KPHP
|
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> |
|
cashpath
|
<?
$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 |
|
TecBrat
|
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 |
|
TDavid
|
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 |
|
TDavid
|
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 |
|
galacey
|
|
(#142 2003-09-01 10:32:01) Post Reply |
|
Nazz
|
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 |
|
Nazz
|
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 |
|
Nazz
|
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 |
|
freak
|
Thank David for making this possible :)
|
(#149 2003-09-02 04:38:06) Post Reply |
|
freak
|
<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 |
|
operations
|
|
(#165 2003-09-09 07:39:25) Post Reply |
|
Quicksaver
|
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 |
|
Quicksaver
|
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 |
|
TDavid
|
Welcome to the course Quicksaver |
(#203 2003-09-14 16:40:45) Post Reply |
|
Cooltude
|
|
(#204 2003-09-15 07:12:34) Post Reply |
|
Shrek
|
<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 |
|
TDavid
|
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 |
|
merlin69
|
|
(#253 2003-09-19 21:41:31) Post Reply |
|
Len
|
<?
$myname = "My name is Len"; $my_website = "My URL is http://www.phpcat.com"; print($myname); print"<BR>"; print($my_website); ?> |
View Previous Thread Print This Page |
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