Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
Section 3 - Conditional Logic July 05, 2013 08:32PM |
Registered: 11 years ago Posts: 123 Rating: 0 |
Re: Section 3 - Conditional Logic July 07, 2013 01:51PM |
Registered: 12 years ago Posts: 115 Rating: 0 |
Re: Section 3 - Conditional Logic July 09, 2013 09:28PM |
Registered: 10 years ago Posts: 22 Rating: 0 |
Re: Section 3 - Conditional Logic July 10, 2013 09:02PM |
Registered: 10 years ago Posts: 22 Rating: 0 |
Re: Section 3 - Conditional Logic July 12, 2013 02:49PM |
Registered: 11 years ago Posts: 21 Rating: 0 |
Language: PHP<?php $correct_username = ';logmein';; $what_visitor_typed = ';logmein2';; if ($what_visitor_typed > $correct_username) { print("You';re not a valid user of this site!"); } else { print("Welcome back, friend!"); } ?>
Re: Section 3 - Conditional Logic July 12, 2013 03:41PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Language: PHPif ($what_visitor_typed == $correct_username) //is tha same //or if ($what_visitor_typed != $correct_username) //is not the same
Re: Section 3 - Conditional Logic July 12, 2013 04:59PM |
Registered: 10 years ago Posts: 38 Rating: 0 |
Re: Section 3 - Conditional Logic July 12, 2013 05:48PM |
Registered: 10 years ago Posts: 22 Rating: 0 |
Re: Section 3 - Conditional Logic July 13, 2013 01:30PM |
Registered: 11 years ago Posts: 73 Rating: 0 |
Re: Section 3 - Conditional Logic July 13, 2013 02:14PM |
Registered: 11 years ago Posts: 73 Rating: 0 |
Language: PHP$myName = Sipho; $entryName = Sipho; if ($myName === $entryName){ echo $myName." is the same as ". $entryName." and they both have a datatype of " .is_int($myName); };
Re: Section 3 - Conditional Logic July 14, 2013 03:50PM |
Registered: 10 years ago Posts: 22 Rating: 0 |
Re: Section 3 - Conditional Logic July 14, 2013 06:19PM |
Registered: 10 years ago Posts: 37 Rating: 0 |
Re: Section 3 - Conditional Logic July 15, 2013 09:11AM |
Registered: 11 years ago Posts: 73 Rating: 0 |
Re: Section 3 - Conditional Logic July 15, 2013 04:43PM |
Registered: 11 years ago Posts: 73 Rating: 0 |
Re: Section 3 - Conditional Logic July 17, 2013 03:50PM |
Registered: 11 years ago Posts: 21 Rating: 0 |
Language: PHP<?php $variable1 = ';5';; //string variable $variable2 = 6; //integer variable print($variable1 + $variable2); ?>
Re: Section 3 - Conditional Logic July 17, 2013 10:32PM |
Registered: 10 years ago Posts: 25 Rating: 0 |
Language: PHP$variable1 = ';9aasd asd';; $variable2 = ';6saf sdfjh';; print($variable1 + $variable2);
Language: PHP$variable1 = ';9aasd asd';; $variable2 = ';aasfafafsdaf6 sdfjh';;
Re: Section 3 - Conditional Logic July 17, 2013 11:21PM |
Registered: 10 years ago Posts: 37 Rating: 0 |
Re: Section 3 - Conditional Logic July 18, 2013 03:09PM |
Registered: 11 years ago Posts: 68 Rating: 0 |
Re: Section 3 - Conditional Logic July 20, 2013 05:34PM |
Registered: 10 years ago Posts: 57 Rating: 0 |
Re: Section 3 - Conditional Logic July 22, 2013 12:13PM |
Registered: 10 years ago Posts: 10 Rating: 0 |
Re: Section 3 - Conditional Logic July 22, 2013 08:05PM |
Registered: 10 years ago Posts: 22 Rating: 0 |
Re: Section 3 - Conditional Logic July 24, 2013 01:30PM |
Registered: 11 years ago Posts: 39 Rating: 0 |
Re: Section 3 - Conditional Logic July 24, 2013 10:53PM |
Registered: 10 years ago Posts: 12 Rating: 0 |
Re: Section 3 - Conditional Logic July 27, 2013 03:49PM |
Registered: 10 years ago Posts: 14 Rating: 0 |
Re: Section 3 - Conditional Logic August 12, 2013 10:44AM |
Registered: 13 years ago Posts: 55 Rating: 0 |
Re: Section 3 - Conditional Logic August 13, 2013 11:33AM |
Registered: 11 years ago Posts: 15 Rating: 0 |
Re: Section 3 - Conditional Logic August 13, 2013 12:57PM |
Registered: 10 years ago Posts: 11 Rating: 0 |
Re: Section 3 - Conditional Logic August 14, 2013 03:48PM |
Registered: 11 years ago Posts: 44 Rating: 0 |
Language: PHP<?PHP $kitten_image = 0; $church_image = 1; if ($kitten_image == 1) { print ("<IMG SRC =images/kitten.jpg>"); } if ($church_image == 1) { print ("<IMG SRC =images/church.jpg>"); } ?>
Re: Section 3 - Conditional Logic August 14, 2013 03:54PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: Section 3 - Conditional Logic August 19, 2013 09:48PM |
Registered: 11 years ago Posts: 14 Rating: 0 |
Re: Section 3 - Conditional Logic August 20, 2013 09:33AM |
Registered: 11 years ago Posts: 73 Rating: 0 |
Language: PHP$Kitten_image = 0; if($Kitten_image == 1){ echo "We have a kitty in here"; } else { echo "Would you believe it, there are no kittens here.."; }
Language: PHP$Kitten_image = 0; if($Kitten_image){ #if variable is initiated or has a value equal to 1 then the following take place echo "We have a kitty in here"; } else { echo "Would you believe it, there are no kittens here.."; }