Sunday, April 24, 2011

Assignment 3 - additional thoughts

I didn't add this to the original post because I was more concerned about getting the requirements done before I started work (I was able to), but now I can create this post piecemeal around calls coming in at work.  Although, I freely admit the post may meander a bit before getting the to point.

This is my fifth quarter at SCCC and I've taken classes more on how they fit around my work schedule than in the order prescribed in the web dev and web design AA tracks.  Because of this, I ended up taking itc216 (PHP) about 3 quarters ago.  It was my first programming class and was a bit of a struggle.  Since then I've taken itc110 (C#) which really helped reinforce some programming principles.  Another benefit was to be exposed to different avenues of advancement as a developer which made me think about what I really wanted.  After some though, I decided that PHP fits better into my desire to work for myself as a web designer/developer. (I do understand that true programming skills are independent of language, but I need to pick one first to focus on to work on those skills.)

Long story, short - I'm really enjoying this class and am excited for the rest of this class (and subsequently itc281.)

So when I was looking at adder.php (after fixing the problems for homework), I tried to figure out how to make it so the person had to enter to enter both numbers to get the addition statement.  So I changed the conditional in line 3 from "if (isset($_POST['num1']))" to "if (isset($_POST['num1']) && isset($_POST['num2']))", but it still will show the addition statement with the numbers being blank when the text boxes were left empty.  It seems that the text box will pass an empty into the variable?  It seems that I would also have to add a check to see if the php boxes are empty and echo a visible error to the user to fill the box as precondition for continuing to the addition script portion.  I'll play around with that once I get internet at home again (3 days!) to see if I can get it to act in the way I want to.  I would do it at work, but constant interruptions are very frustrating to me when trying to work on code.

No comments:

Post a Comment