Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Re: TASK 2A
August 21, 2007 03:19PM
Completed
Re: TASK 2A
August 24, 2007 06:42AM
I finished task 2a last night, im really starting to enjoy this course.
Re: TASK 2A
August 24, 2007 07:16PM
I don't know what is going wrong, the practical application with colorselect.html is not working properly. I tried changing GET to POST and putting the @extract($_POST) on the color.php file but still nothing, it's not changing anything.
Any help?
Re: TASK 2A
August 24, 2007 10:12PM
could you please paste the code in here? then we can can get you sorted spinning smiley sticking its tongue out

Gilham
Re: TASK 2A
August 29, 2007 06:39AM
Finished Task2A. No problemo

The Harder You Fall The Higher You Bounce
Re: TASK 2A
September 03, 2007 01:54PM
Completed 2A. drinking smiley
Re: TASK 2A
September 04, 2007 10:26AM
its been tough with work on my side but i completed 2A hot smiley
Re: TASK 2A
September 04, 2007 12:34PM
Hi Super G,

This is what it's giving me on the Address Bar when I select "Yellow" on the colorselect.html.

http://localhost/color.php?color=Yellow

but my problem is that the color is not actually changing on the page (this is when I use @extract($_GET) on the color.php file.).

It gives me
http://localhost/color.php

When I use @extract($_POST) on the color.php file

Does anyone see what can be the problem?
Re: TASK 2A
September 04, 2007 04:39PM
hi arminez.
Try putting the @extract($_GET) just below the <?php of your color.php and type everything else as in the masterskill book.

Clicking submit query in http://localhost/colorselect.html should give you the desired result.

Otherwise I think you will get http://localhost/color.php with no color change if you just type http://localhost/color.php in your browser.

Post your color.php code so we can help.

Good luck
Re: TASK 2A
September 10, 2007 10:25AM
HiSandile this is my color.php codes

<?php
@extract($_GET);
switch ($color) {
case "yellow":
$bgcolor="#FFCC00";
break;
case "blue":
$bgcolor="#4682B4";
break;
case "silver":
$bgcolor="#C0C0C0";
break;
case "beige":
$bgcolor="#FFE4C4";
break;
}
echo "<html>";
echo "<head><title>Selected Background Page</title></head>";
echo "<body bgcolor='$bgcolor'>";
echo "</body>";
echo "</html>";
?>

Hope it will help find the problem, because all I get is:
http://localhost/color.php?color=Yellow on the address bar, but no color.
Re: TASK 2A
September 10, 2007 11:51AM
Hi Arminez,

Write (in color.php) "yellow" as "Yellow", "blue" as "Blue", etc and everything will be fine.

Hope this helps.
Re: TASK 2A
September 10, 2007 12:24PM
Hi Sandile,
I have tried changing the case of the first letters as you suggested but still I'm having the same problem.
Re: TASK 2A
September 10, 2007 02:09PM
I copied the code from your last posting as is and changed the "yellow" to "Yellow", etc and everything worked as expected.

Did you change anything in the colorselect.html file? Try using the original file.
Re: TASK 2A
September 10, 2007 02:42PM
Hi, Sandile it's me again
I've tried using the original colorselect.html still the same, u know when I'm using GET it's showing the code on the address bar as it's supposed to,so, I guess the codes are fine, this should perhaps be another problem that makes my PC unable to show the colors as expected.
I tried to complete task 2B, everything is ok. Maybe Mac can help in my case I guess. How can the very same codes work on your PC and not mine?
Re: TASK 2A
September 10, 2007 03:10PM
Hi Arminez!

I can't figure out what the problem is, but I took your code and corrected the cases and things worked fine. Here's the code I used.
<?php
@extract($_GET);
switch ($color) {
case "Yellow":
$bgcolor="#FFCC00";
break;
case "Blue":
$bgcolor="#4682B4";
break;
case "Silver":
$bgcolor="#C0C0C0";
break;
case "Beige":
$bgcolor="#FFE4C4";
break;
}
echo "<html>";
echo "<head><title>Selected Background Page</title></head>";
echo "<body bgcolor='$bgcolor'>";
echo "</body>";
echo "</html>";
?>
Re: TASK 2A
September 10, 2007 03:32PM
Thanks a lot Sandile,
I'm trying to move on because I'm very late as u can see, this case let's take it to Mac.
Let's stay in touch thanks a lot for your attention, I really appreciate.
Re: TASK 2A
September 12, 2007 07:18AM
I also checked out ur code arminez..
PHP is case sensitive as mac indicated in another post...
I copied the code sandile posted and it ran fine...
Try stopping and restarting all modules on the xampp control panel.
avatar
Mac
Re: TASK 2A
September 14, 2007 12:05PM
I assume it is sorted out now...
Re: TASK 2A
October 24, 2007 08:32PM
Task 2A Completed smiling bouncing smiley
Sorry, only registered users may post in this forum.

Click here to login