Welcome! Log In Create A New Profile

Advanced

Topic 3B

Posted by Anonymous User 
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
avatar
Mac
Re: Topic 3B
March 15, 2006 03:59PM
If you ge tthe standard page cannot be found error, then you can bet your life the path to the directory is not correct. I don't have the manual in front of me right now and I can't remember the exact path, but if it says for e.g.
/studentPHP/Network/
make sure you those directories exist.


http://localhost/studentPHP/dir=./Network cannot work.

Methinks this is a case of S and $ - typo somewhere.
Re: Topic 3B
March 19, 2006 10:49PM
Completed
Re: Topic 3B
March 21, 2006 01:50PM
Done:

- Counter: Created, no problems there; numbers display as they should when refreshing.

- Guestbook: Having problems here.. created the .php files and all seems fine. When I submit an entry to the guestbook and return to the guestbook entries, all I see is:

Eric Heller: I think it is fabulous!

:

:

:

:

:

And I keep generating more : with each guestbook entry I create. tongue sticking out smiley Trying to find out where I'm going wrong! *scratches eyeballs out*

Going on to Topic 3B-2 now.
Re: Topic 3B
March 21, 2006 02:11PM
Alice hi,

Check that you have declared your variables in the guestbook.php file.

Caio
Re: Topic 3B
March 21, 2006 02:25PM
Will do, thanks Wayne!

$fp = fopen("guest.txt", "a"winking smiley;
fwrite($fp, "<br><b>$firstname $lastname:</b> $comments<br>"winking smiley;
fclose($fp);

That's what I have in guestbook.php. The only things I've really been changing are the "./example.txt" .. to "example.txt" because they all reside in the one directory (can see it in my code above too) and won't work if I don't change them. I'm probably doing something majorly wrong..

Now.

Topic 3B-2.. *suicides*

(I'm allowed to be a drama queen today.) tongue sticking out smiley

The directory displays fine in the browser until I click on any item, and then I get a 404 error.

smiling smiley

Going back to bed now, will start the day over in a while..
Re: Topic 3B
March 21, 2006 02:54PM
Task 3B-2 - done, and sorted. Yay!

Still working on the guestbook. smiling smiley
Re: Topic 3B
March 21, 2006 02:58PM
Alice,

Remember our old friend

$variable=$_POST['variable'];
Re: Topic 3B
March 21, 2006 03:02PM
Oh. Yah.

sad smiley I want a new friend. This one is.. naughty.


Thanks Wayne! smiling smiley
Re: Topic 3B
March 21, 2006 03:07PM
Ok. Put in $firstname=$_POST['firstname']; etc etc and all displays fine now!

Thanks again for all the help! smiling smiley Appreciated!

Topic 3.. done. Phew!
avatar
Mac
Re: Topic 3B
March 21, 2006 03:33PM
Reminder that the $variable=$_POST['variable']; is specific to later verions of PHP. So on some servers with arlier versions of PHP you may get away with it. The reason is that register_globals in PHP5's config file is now set to off by default in php5 - a security feature.

Sorry, you do not have permission to post/reply in this forum.