Welcome! Log In Create A New Profile

Advanced

Our sites

Posted by April 
Announcements Last Post
Announcement myUnisa availability 21 to 24 March 2019 03/17/2019 02:24PM
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
Our sites
February 09, 2013 08:56AM
For the love of ICT3612
<3
Re: Our sites
February 11, 2013 02:20PM
@45929149 , check your function.php page, you need to use a function, you didn't use one as there is no where your script where the function with 5 arguments is created and then called.

This is your page and from what i understand from the instructions its not correct.

<?php
error_reporting(0);
$message = "";
$varsity = "";
foreach ($_REQUEST as $value){

if(is_array($value)){

foreach($value as $varsity){

$message = "You want to futher your higher education at <font color='red'>$varsity</font> please study hard and we wish you luck.";

}
}

}

if ($varsity == ""winking smiley{

$message = "<font color='red'> Please select one institution from drop-down menu.</font>";

}
?>
Re: Our sites
February 12, 2013 09:52AM
@ BasetsanaM I think you have to re look at the code I used an array function that accept the 5 arguments of the varsity I declare it on the select drop box and check it with if statement and loop through to determine selected value, thanks for the effort will take a look at tut again mybe s me who missed understood but otherwise did what is expected on the pages.

Declaration of my array is name=choice[]
Re: Our sites
February 12, 2013 10:40AM
Declaration is name='choice[]'
avatar
Mac
Re: Our sites
February 12, 2013 11:36AM
And read the post on formatted code....
Re: Our sites
February 12, 2013 07:07PM
Ooh sorry my mistake got that.
Re: Our sites
March 09, 2013 03:20PM
Hi April,

I agree with BasetsanaM, some of your code is not as I understand the Tut, just for advise use it... don't... I might be wrong.

Calc.php: Your code dosn't check if deviding by 0 or if user entered letters in both fields.
String.php: In some cases I think it should test if user entered numerics.
Array.php: I don't see were you are creating or using an Array...
Function.php: I feel you used 1 Argument with 5 options, I think there should be 5 drop down boxes (Arguments) with options, I also don't see were you create or Call a Function, this might be more for your Array.php page.

Also all your pages doesn't have comments...

But like I said I might be wrong... just some food for thought.
Re: Our sites
March 10, 2013 06:21PM
Hi April, me again...
I was thinking and mayb Mac can help me if my thoughts on this is rite or wrong (I reallty would like to know if I'm starting to grasp the finer details of PHP, I see PHP in my futher career)

In your function page u create an Array that catches users option from drop down, but your drop down can only have 1 value...
Why create an Array that will always just receive 1 value and then have all that code to loop thru the Array that has only 1 value?

Rather don't create as an Array but use variable...

Sorry if I am overstepping but I need to know if I'm understanding PHP principles, also can I read other peoples PHP and understand what they are doing with the code.
avatar
Mac
Re: Our sites
March 11, 2013 07:32AM
I only notice now that you give links to your site with (complete) code...! You cannot do that!
Re: Our sites
March 11, 2013 09:04AM
Oooh but thought the txt file should contain all the codes we have used, by the way for the portfolio should we make those txt links or should just leave them out?
Re: Our sites
March 11, 2013 09:53AM
@ 46470107 ur right I hvent do much validation in my calc page like usng an validation num function to check the numbers but otherwise to the level of my understanding all the pages are good n is good to hear that u see ur php skills evolving in future, if may ask how far ar u in portfolio.
Re: Our sites
March 11, 2013 03:14PM
Hi April,

Ag havn't started with portfolio pages between doing 3611 (vb.net) 2nd Assign, work with all the meetings and all else I find little time.
Hopefully by end next week I should b finished with vb then can give php attention again.

Hey all of us understand stuff diff thats why I like these chat forums so we can learn from each other.
Stay in touch.

Ps. remember your comments in your code...
O and I think Mac ment we shouldn't share our full code with other students, if you submit to him the txt files should be there with the links.
Sum1 might ...ahem... "borrow" ur code eye rolling smiley
avatar
Mac
Re: Our sites
March 11, 2013 03:49PM
Yes, the text files should contain all the code, but you post your site here so all students have access to your complete code.....!
Re: Our sites
March 12, 2013 09:14AM
Ok ayt got that some might take em as it is should have thought of plagiarism before doing so NX!!!! Will remove em asp.
Sorry, only registered users may post in this forum.

Click here to login