我到处寻找,却找不到任何类似的东西。
> I need this Slide toggle function to work for various hidden divs
> (that contain images and text) that belong to each button,if it's
> possible the hidden divs slide from the right or even from bottom to
> up.Also if it's possible to add hoover on buttons to let the user know that
they are buttons to click on them,
如果需要更多解释,请告诉我。我将非常感谢您的帮助!
Slide toggle from right- Js fiddle
这个想法的解释在这里:
答案 0 :(得分:1)
如果您希望所有字段都是必填字段,则$name
或$email
中的任何一个为空时都会出错;所以你使用OR。此外,如果反垃圾邮件不是4,只是抛出错误,您不必检查$_POST['submit']
,因为您已经检查过它。
if ($_POST['submit']) {
if ($name != '' OR $email != '') {
if ($human == '4') {
if (mail ($to, $subject, $body, $from)) {
echo '<p>Your message has been sent!</p>';
} else {
echo '<p>Something went wrong, go back and try again!</p>';
}
} else {
echo '<p>You answered the anti-spam question incorrectly!</p>';
}
} else {
echo '<p>You need to fill in all required fields!!</p>';
}
}