Search the Community
Showing results for tags 'pursue'.
-
I've been struggling with the following Pursue challenge. I found an eloquent solution in the forum for version 4 but it included a function which will not be discussed until chapter 3. I just can't find a way to echo a greeting based on gender selection without a nested conditional. I would appreciate help on this. Pursue: Rewrite the gender conditional in handle_form.php (Script 2.4) as one conditional instead of two nested ones. Hint: You’ll need to use the AND operator. Here is the nested conditional: // Validate the gender: if (isset($_POST['gender'])) {
-
I am having trouble creating the code to improve the security of add_print.php in Chapter 19. I am adapting the code from chapter 11 to this problem and not having any luck. I want to validate the file type before adding a print to the database. Does anyone have the solution to this review and pursue question? thanks
-
Hello All, Well I'm wrapping up the last part of this book and seem to have hit a roadblock. On the first Ch. 13 Pursue assignment that tells you to make the login form sticky, I can't seem to get it to work and I've been able to get all of the previous ones pretty quickly. I know it'll probably be something that makes me feel silly after I figure it out, but after 2 hours of mixing and rearranging code, I keep coming back to the same thing and get somewhat similar results each time. Aside from it not working properly, when I put my code in the value attribute, it shows up as code in th
-
I've been racking my brain over how to achieve this, but I'm stumped. Here's the code I use in the relevant contact.js: function process() { 'use strict'; //set initial check for validation to true because there are no errors yet var okay = true; //reference to email and comments elements var email = document.getElementById('email'); var comments = document.getElementById('comments'); //validate email if (!email || !email.value || (email.value.length < 6) || (email.value.indexOf('@') == -1)) { okay = false; alert('Please enter a valid email address'); }//end if //validate comme