chadone Posted February 15, 2019 Share Posted February 15, 2019 Hi Everyone, Just curious. I'm looking at the gender part of this script and it has a elseif nested in a if else lines 45 - 57. Is there a reason for the nested else? The returned statement says "Gender should be either M or F!" but there's no discernible way to select anything other than M or F. Thanks! Link to comment Share on other sites More sharing options...
Larry Posted February 15, 2019 Share Posted February 15, 2019 Ah! Good question! The reason is because we don't want to assume the data will come from the form or in an unadulterated way. It'd be really easy to submit data from elsewhere to this script or to modify the form in the browser and then submit that. So these conditionals provide an extra layer of security. Link to comment Share on other sites More sharing options...
chadone Posted February 17, 2019 Author Share Posted February 17, 2019 AHHHHH, there it is. Thanks Larry, really good book so far. Link to comment Share on other sites More sharing options...
Recommended Posts