Bill, this has been posted already previous in the thread, but I think the issue is simple. isset() will always return true for any of the if's, and because the first If() returns true, the other two won't ever run as an elseif(). The reason is that the form is always sending over the three variables you are testing. So they are 'set', but they might also be empty. isset() checks to see if the variable exists; it doesn't check if the variable is empty. So, you'd probably want:
Code: Select all
if ( isset($_GET['email']) && !empty($_GET['email']) {
...
Now, that's still not good enough, I'd imagine, for your purposes.
Better would be something like this:
Code: Select all
if ( isset($_GET['email']) || isset($_GET['fname']) || isset($_GET['author'])) {
$email = trim($_GET['email'];
$fname = trim($_GET['fname'];
$author = trim($_GET['author'];
if ( !empty($email) ) {
// Yay! Email is good! Run your funky code!
} elseif ( !empty($fname) ) {
// More code here...
} // And the other elseif here...
}
Of course, this doesn't do any actual verification on the code, and their are a host of design issues with this, but frankly, for your purposes, this probably solves the issue in the easiest way possible.