Good morning, I have the following page: Latinbook notebook that shows a series of notebooks, clicking on the cover of the books displays a modal with common information and its respective image. It happens that when trying to adjust with @media queries
, in device resolutions, when touching, the info is displayed but it is too long, is there a way that one can scroll through that info regardless of the page? something like a scroll or a "see more"? From already thank you very much
Nicolas Dure's questions
I have a problem with my page, I'm sure it's something very simple but I'm not realizing where I have the error. The problem is that the contact form does not work for me, it throws me the following error:
"Sorry, there was an error in your data and the form cannot be submitted at this time. Details of the errors. We are sorry but there seems to be a problem with the data sent. Please correct these errors and try again." And I can't find a way to understand where the error is.
The link of my page is http://indgraphicdesign.com.ar/contacto.html
And here I attach my PHP code:
<?php
if(isset($_POST['email'])) {
$email_to = "
[email protected]";
$email_subject = "Mail de la página";
function died($error) {
// si hay algún error, el formulario puede desplegar su mensaje de aviso
echo "Lo sentimos, hubo un error en sus datos y el formulario no puede ser enviado en este momento. ";
echo "Detalle de los errores.<br /><br />";
echo $error."<br /><br />";
echo "Porfavor corrija estos errores e inténtelo de nuevo.<br /><br />";
die();
}
// Se valida que los campos del formulairo estén llenos
if(!isset($_POST['first_name']) ||
!isset($_POST['last_name']) ||
!isset($_POST['email']) ||
!isset($_POST['telephone']) ||
!isset($_POST['message'])) {
died('Lo sentimos pero parece haber un problema con los datos enviados.');
}
//En esta parte el valor "name" nos sirve para crear las variables que recolectaran la información de cada campo
$first_name = $_POST['first_name']; // requerido
$last_name = $_POST['last_name']; // requerido
$email_from = $_POST['email']; // requerido
$telephone = $_POST['telephone']; // no requerido
$message = $_POST['message']; // requerido
$error = ""; //Linea numero 52
//En esta parte se verifica que la dirección de correo sea válida
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$email_from)) {
$error_message .= 'La dirección de correo proporcionada no es válida.<br />';
}
//En esta parte se validan las cadenas de texto
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$first_name)) {
$error_message .= 'El formato del nombre no es válido<br />';
}
if(!preg_match($string_exp,$last_name)) {
$error_message .= 'el formato del apellido no es válido.<br />';
}
if(strlen($message) < 2) {
$error_message .= 'El formato del texto no es válido.<br />';
}
if(strlen($error_message) > 0) {
died($error_message);
}
//A partir de aqui se contruye el cuerpo del mensaje tal y como llegará al correo
$email_message = "Contenido del Mensaje.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "Nombre: ".clean_string($first_name)."\n";
$email_message .= "Apellido: ".clean_string($last_name)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "Teléfono: ".clean_string($telephone)."\n";
$email_message .= "Mensaje: ".clean_string($message)."\n";
//Se crean los encabezados del correo
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
<!-- incluye aqui tu propio mensaje de Éxito-->
Gracias! Nos pondremos en contacto contigo a la brevedad
<?php
}
?>
I have a problem when making my page responsive .
It happens that by reducing the size of the screen, my normal menu disappears so that a smaller one appears as for a device with a button that hides and displays my sections.
The problem is that when I press the button and hide the menu, if I enlarge the resolution again, the normal menu reappears but with the buttons hidden.
This is the link to my page that contains the following code:
$(document).ready(main);
var contador = 1;
function main() {
$("header nav").hide(); //Ocultamos el Menu
$(".menu_bar").click(function() { //Funcion del Click
$("header nav").slideToggle("slow"); //Mostramos/Ocultamos el Menu al hacer click en el Boton
}); //Terminamos la Funcion del Click
$(".menu_bar").click(function() {
if (contador == 1) {
$('nav').animate({
left: "0"
});
contador = 0;
} else {
contador = 1;
$("nav").animate({
left: "-100%"
});
}
});
}
$(window).resize(function() {
if (window.matchMedia("(min-width: 400px)").matches) {
$("header nav").addClass("show"); //Mostramos el menu
// si estas utilizando hide(), quizá deberías usar show(),
}
});