- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi there,
I have this form, so when you type in a certain phrase, it will take you somewhere based on that phrase, but… it only works if I hit Enter on my keyboard. I’d like to work when you click the Submit button as well.
Anybody have any ideas?
// Portal Password
if (isset($_POST))
switch($_POST)
{
case "pass1":
header("Location: http://www.google.com/");
exit();
case "pass2":
header("Location: http://www.yahoo.com/");
exit();
default:
header("Location: http://www.404.com/");
exit();
}
}
?>
Form
Input type=”submit” not button :-)
Try using type=”submit” instead of “button”, otherwise the form doesn’t know what it’s supposed to do when you click it.
How about if type was an image, how would you go about this type=”image”
THAT WORKED! Yay!
I’ve been examining the thing forever, and a little text change, and it fixed it. Thank youuuu :)