School Map:
Home / Enroll
$ Student Records; Class
$ News @ LIVE
Tech Radio * Support/FAQ
| Store | FORUMS
Class / Forums / php101 ![]() |
Week #3 Basic To-Do Assignment: Post here! |
(#4 2003-08-07 15:59:16) Post Reply |
|
TDavid
|
Week #3 Basic TO-DO ASSIGNMENT: Write a script to print to the browser a different url every day of the month using an array and no conditional statement (no switch/case or if/else).
Post this assignment here so that we can offer comment/critique for you.
|
(#56 2003-08-17 18:09:49) Post Reply |
|
Sk8rRIMuk
|
I think you shoud get phpbb2 or something for the forums, anyways I am not sure about the advanced assignmentcould you help me with that :S. |
(#64 2003-08-19 08:22:56) Post Reply |
|
Donnie
|
Finished the Basic Assignment 3.
|
(#145 2003-09-01 19:14:07) Post Reply |
|
galacey
|
|
(#146 2003-09-01 19:21:06) Post Reply |
|
galacey
|
Sorry to repost, left off the closing /A tag at the end but it still worked.
|
(#169 2003-09-09 09:21:09) Post Reply |
|
Quicksaver
|
it has a couple of extras, i was kinda bored :P
working url |
(#194 2003-09-11 11:26:20) Post Reply |
|
TDavid
|
galacey - don't be sorry about reposting ;) Correcting your own bugs -- or helping other students -- is encouraged ;) |
(#195 2003-09-13 00:22:32) Post Reply |
|
Nazz
|
|
(#196 2003-09-13 16:38:08) Post Reply |
|
operations
|
http://members.lycos.co.uk/operations/
|
(#206 2003-09-15 08:38:45) Post Reply |
|
Shrek
|
Hello, Every One, Here is my Assignment Today...
|
(#207 2003-09-15 08:47:49) Post Reply |
|
Shrek
|
I think i need to amend some code
The code to print the URL should be
. Thx a lot. |
(#251 2003-09-19 12:03:17) Post Reply |
|
amiller
|
|
(#255 2003-09-19 23:07:08) Post Reply |
|
merlin69
|
I added a date and time function just so I can keep up with earlier lessons and NOT forget how to do them. you can see a working version at http://www.realm-of-merlin.com...chool/week3.php |
(#275 2003-09-26 05:25:02) Post Reply |
|
maddy
|
|
(#315 2003-10-12 15:30:06) Post Reply |
|
zxrod
|
I think I've got this one down. Tell me if otherwise..
<html> <title>Week 3 Basic To-Do Assignment</title> <body>
</body> |
(#331 2003-10-24 21:51:39) Post Reply |
|
willie565
|
Code Works but I didn't Put A Url For Every Day all The weeks are the same
<a href="http://megatech.tk/~will/datem.php"> The Code</a> and I do now realize there's a date function for the weeks ha oh well |
(#337 2003-10-27 16:41:18) Post Reply |
|
Tala
|
It's not working. WTF am I doing wrong?
|
(#338 2003-10-27 17:56:51) Post Reply |
|
Quicksaver
|
you have this:
print("< a href=\"$url[$day]$url[$day]</A>"); where it should be like this: print("<a href=\"$url[$day]\">$url[$day]</A>"); if forgot to close the "a href" part with the ">" and you added a space before the "a". It should work now :) |
(#380 2003-11-16 20:54:54) Post Reply |
|
coinweb
|
<html>
<head> <TITLE>Homework For Week #2</TITLE> </head> <body bgcolor="blue"> <center><table width="75%" border="1" bgcolor="white"> <tr> <td> <?php /*Write a script to print to the browser a different url every day of the month using an array and no conditional statement (no switch/case or if/else). */ //group of urls to be cycled through daily $url = array('http://www.coinwebstore.com/0','http://www.coinwebstore.com/1', 'http://www.coinwebstore.com/2','http://www.coinwebstore.com/3', 'http://www.coinwebstore.com/4','http://www.coinwebstore.com/5', 'http://www.coinwebstore.com/6','http://www.coinwebstore.com/7', 'http://www.coinwebstore.com/8','http://www.coinwebstore.com/9', 'http://www.coinwebstore.com/10','http://www.coinwebstore.com/11', 'http://www.coinwebstore.com/12','http://www.coinwebstore.com/13', 'http://www.coinwebstore.com/14','http://www.coinwebstore.com/15', 'http://www.coinwebstore.com/16','http://www.coinwebstore.com/17', 'http://www.coinwebstore.com/18','http://www.coinwebstore.com/19', 'http://www.coinwebstore.com/20','http://www.coinwebstore.com/21', 'http://www.coinwebstore.com/22','http://www.coinwebstore.com/23', 'http://www.coinwebstore.com/24','http://www.coinwebstore.com/25', 'http://www.coinwebstore.com/26','http://www.coinwebstore.com/27', 'http://www.coinwebstore.com/28','http://www.coinwebstore.com/29', 'http://www.coinwebstore.com/30'); //This prints the daily featured website to the browser. $day_of_month = (date("j")-1); print("Please visit today's featured website: <a href=\"$url[$day_of_month]\">$url[$day_of_month]</a>"); ?> </td> </tr> </table></center> </body> </html> |
(#386 2003-11-17 13:37:49) Post Reply |
|
RamblnRick
|
Lots of hours were spent figuring this one out!
<html> <head> <title>Week Number 3 Advanced - Site Of The Day for the entire month</title> <body>
</body> </html> Working Script at: http://www.ricksramblings.com/..._assignment.php |
(#388 2003-11-17 18:42:03) Post Reply |
|
RamblnRick
|
ooops! Sorry, that should have been posted in the advanced forum. |
(#401 2003-11-23 05:39:57) Post Reply |
|
Ahkorahil
|
<HTML>
<HEAD> <TITLE> 3th Assignment </TITLE> </HEAD> <BODY> <?php $websites= array("www.google.com", "www.neti.ee", "www.hot.ee", "www.php.com", "www.nut.ee", "www.zone.ee", "www.zone.com", "www.thelandofshadow.com", "www.mail.ee", "www.msn.com", "www.hotmail.com", "www.delfi.ee", "www.delfi.ee", "www.zone.ee/kincclan", "www.zone.ru", "www.2advanced.com", "www.astalavista.com", "www.yahoo.com", "www.scriptschool", "www.delfi.lv", "www.reality.com", "www.counter-strike.net", "www.lammas.ee", "www.flashkit.com", "www.cia.com", "www.civilizarion3.com", "www.google.ee", "www.nice1.com", "www.address.com", "www.helloworld.com", "www.zoo.com"); $day = (date("j")-1); printf("$websites[$day]"); ?> </BODY> </HTML> //Script works! =) |
(#415 2003-12-11 04:42:59) Post Reply |
|
fudded
|
|
(#431 2003-12-27 02:44:35) Post Reply |
|
n2o2k
|
|