Welcome! Log In Create A New Profile

Advanced

TASK 2A

Posted by VickyP 
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
TASK 2A
July 25, 2007 06:05PM
Task 2A completed.

Changed GET to POST on colorselect.html and added @extract($_POST); to the color.php file and everything is working ok.thumbs up smiley
avatar
Mac
Re: TASK 2A
July 26, 2007 09:53AM
Hey wena! There already is a topic started on Task 2A - you only start a new topic if it does not exist, otherwise you add to that topic smiling smiley
Re: TASK 2A
July 26, 2007 11:36AM
using @extract($_GET) on color.php would have worked without the need to change GET to POST in colorselect.html.
Re: TASK 2A
July 26, 2007 01:07PM
I realised Sandile started a thread on Task 2A but he also completed Task 1A + 1B on that thread and I did post my completion of Task 1A + 1B there. I just thought that because I has finished Task 2A much later that it would okay for the rest of us if I started a new thread. smile

Sandile, I know that I could've use @extract($_GET) on color.php but going through the older forums I found a posting by Mac saying that "you should use GET to view if your variables are passed correctly to the next page, POST when it works. If you pass with GET, people may add funny stuff on that is a security risk".
Re: TASK 2A
July 26, 2007 03:39PM
Thanx Vicky, I must have missed the posting by Mac to always use _POST instead of _GET.

I remember completing a form on some website some time back where I was required to enter my username and password (which was in a hidden field). I got puzzled when I saw both the username and password in the url of the next page.
I even bookmarked the page with the username and password still on the url.
The people who wrote that page were probably passing variables using _GET???

From now on, I will use _POST.
Anonymous User
Re: TASK 2A
July 26, 2007 07:32PM
Task 2A completed!
Re: TASK 2A
August 01, 2007 11:05AM
Tack 2A completed!!!
Re: TASK 2A
August 01, 2007 11:23AM
Both GET and POST works!!!
The difference between the two is that using GET, the variables and data will be shown in the page address, but using the POST it is invisible.
Re: TASK 2A
August 01, 2007 12:26PM
You can also use _REQUEST which includes variables passed using either _GET or _POST but it also show the variables in the page address.
Re: TASK 2A
August 05, 2007 05:20PM
Hi, i am having some difficulty with this task, I cannot find the colorselect.html file. Any help will be appreciated,
Re: TASK 2A
August 05, 2007 07:00PM
Hi Swadesh,

On one of the CDs you were given, there's an archive - UTV76-089dd_rev1.0(13.2mb).
Upon extracting the archive you will find a folder called StudentPHP which contains all the files that are used in the tasks.
Re: TASK 2A
August 06, 2007 10:21AM
Task 2A completed. No problems.
Re: TASK 2A
August 06, 2007 05:08PM
Thank you Sandile,

I received 2 CDs, both titled "PHP June 2007" and both have exactly the same files, I did not receive the Masterskill CD, I will enquire with MS Havenga.
Re: TASK 2A
August 07, 2007 08:41AM
Swadesh,

Ask her to email you the STUDENT PHP folder coz its quite small only 13KB so you can start working while you wait for the right CD. Or just give me your email address and I will forward it to you.
Re: TASK 2A
August 07, 2007 05:25PM
Sandile,

This will be a huge help

My email address is swadesh110@hotmail.com
Re: TASK 2A
August 08, 2007 08:29AM
Swadesh,

Have emailed the files to you. But you still have to aske MS Havenga to send you the CD.
Re: TASK 2A
August 08, 2007 08:18PM
Sandile

The files were received, tanx a Mil, It will help me get started.

Already emailed Ms Havenga, awaiting reply.

Swadesh
Re: TASK 2A
August 12, 2007 05:03PM
2A successfully completed, The colorselect.html exercise worked only after adding @extract($_POST); (Just wondering why this line of code is not mentioned in the manual or text book)
Re: TASK 2A
August 13, 2007 02:31PM
hi there sandile
i was wondering if you could also send me the files please if that is possible my email adress is deryaerkilinc@hotmail.com

thanks a mil smiling smiley

derya
Re: TASK 2A
August 13, 2007 05:04PM
Derya.

Files sent - check your hotmail.

cheers
Re: TASK 2A
August 14, 2007 09:10AM
Hi Sandile

thank you i have received the files spinning smiley sticking its tongue out

Best regards
Re: TASK 2A
August 15, 2007 02:46PM
where do I add this @extract($_POST)?
Re: TASK 2A
August 15, 2007 03:10PM
Hi All

I am working on building Guestbook. When I enter my details and submit the form. I get the following message


Warning: fopen(. /guest.txt) [function.fopen]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\StudentPHP\guestbook.php on line 5

Warning: fwrite(): supplied argument is not a valid stream resource in C:\Program Files\xampp\htdocs\StudentPHP\guestbook.php on line 6

Warning: fclose(): supplied argument is not a valid stream resource in C:\Program Files\xampp\htdocs\StudentPHP\guestbook.php on line 7
Your entry has been added to the guestbook!

Return to the Guestbook

When I click on return to Guestbook, it takes me back to the Guestbook form.
Re: TASK 2A
August 16, 2007 06:12PM
2a canned
Re: TASK 2A
August 17, 2007 09:22AM
What do you mean by canned?
Re: TASK 2A
August 17, 2007 12:28PM
Canned = Completed smiling bouncing smiley
Re: TASK 2A
August 17, 2007 01:13PM
Exactly Vicky smiling smiley
Re: TASK 2A
August 17, 2007 09:54PM
Task 2A completed. I only changed the $color variable to $_GET in the color.php file and all worked well.
avatar
Mac
Re: TASK 2A
August 20, 2007 08:02AM
Warning: fopen(. /guest.txt) [function.fopen]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\StudentPHP\guestbook.php on line 5

PHP couldn't find the file, which implies the path is wrong. That causes the rest of the error messages.
Re: TASK 2A
August 21, 2007 02:58PM
Task 2A completed
Sorry, only registered users may post in this forum.

Click here to login