edoplaza Posted September 2, 2009 Report Posted September 2, 2009 Error Oops, it appears you forgot to enter either your email address or your message. Please press the BACK button in your browser and try again. Quote
bishwadeep Posted September 3, 2009 Report Posted September 3, 2009 (edited) <?php if(isset($_POST['submit'])){// multiple recipients$to = 'edoplaza@yahoo.com';$subject = 'Feedback form results';$message = 'name: '.$_POST['name']."";$message.= 'Check in date: '.$_POST['checkindate']."";$message.= 'Check out date: '.$_POST['checkoutdate']."";$message.= 'Adults: '.$_POST['adults']."";$message.= 'Childs: '.$_POST['child']."";$message.= 'Comments: '.$_POST['comments']."";$headers = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";$headers .= 'From: Birthday Reminder ' . "\r\n";mail($to, $subject, $message, $headers);}?>Name: Check in date: Check out date: Adults: Childs: Comments: Edited September 3, 2009 by bishwadeep Quote
edoplaza Posted September 3, 2009 Author Report Posted September 3, 2009 Hello bishwadeep, Thank you very much for all your help. This is exactly what I wanted. Of course, I'll put all the css in a different file, I just wanted to focus on the js - php part. Thank you very much and greetings from Venezuela. When the site is finished, I'll let you know. Regards, Eduardo Quote
edoplaza Posted September 3, 2009 Author Report Posted September 3, 2009 (edited) Sorry to bother you one last time. Your code works perfectly, but now, I've lost my little "thank you" page after the user submits the info, and the other one, "oops, there has been an error." How do I integrate a verification code? I used to have this: then, on the sendmail.php I had this: if (!isset($_REQUEST['email'])) { header( "Location: http://www.puntabahareque.com/thankyou.html\" ); etc. (you can see it on the top post) I can see that in your new code you don't have the action="sendmail.php" anymore, but action "". So, where do you put the verification code? You can see what I mean here: http://www.puntabahareque.com/thankyou.html Thanks once again, Eduardo Edited September 3, 2009 by edoplaza Quote
bishwadeep Posted September 4, 2009 Report Posted September 4, 2009 (edited) Email: Check in date: Check out date: Adults: Childs: Comments: Edited September 4, 2009 by bishwadeep Quote
edoplaza Posted September 4, 2009 Author Report Posted September 4, 2009 Hello again bishwadeep, Now It is perfect! Thank you very much, you have been very patient... Nepal must be an amazing country, have you seen the Mount Everest already? Best regards, Eduardo Quote
bishwadeep Posted September 7, 2009 Report Posted September 7, 2009 Hi Eduardo, I am glad to hear that your problem is solved. Yes I have seen Mt everest from far away and i am planning to go to the Mt everest base camp. Please remember me if any problem arises. regards, Bishwadeep Quote
edoplaza Posted September 7, 2009 Author Report Posted September 7, 2009 (edited) <?phpif ($_POST && isset($missing) && !empty($missing)) {?>Por favor, complete la informaci?n requerida. <?php }elseif ($_POST && !$mailSent) {?>Disculpe, su mensaje no pudo ser enviado. Por favor int?ntelo m?s tarde. <?php }elseif ($_POST && $mailSent) {?>Su mensaje fue enviado con ?xito. Gracias por contactarnos. <?php } ?>Datos personalesNombre y apellido: <?php if (isset($missing)) { echo 'value="'.htmlentities($_POST['name']).'"'; } ?> /> <?php if (isset($missing) && in_array('name', $missing)) { ?>Por favor, escriba su nombre <?php } ?> Tel?fono celular: <?php if (isset($missing)) { echo 'value="'.htmlentities($_POST['telefono']).'"'; } ?> /> <?php if (isset($missing) && in_array('telefono', $missing)) { ?>Por favor, escriba su tel?fono <?php } ?> Correo electr?nico: <?php if (isset($missing) && in_array('email', $missing)) { echo 'value="'.htmlentities($_POST['email']).'"'; } ?> /> <?php if (isset($missing) && in_array('email', $missing)) { ?>Por favor, escriba su correo electr?nico <?php } ?> Fecha de llegada: <?php if (isset($missing) && in_array('checkindate', $missing)) { echo 'value="'.htmlentities($_POST['checkindate']).'"'; } ?> /> <?php if (isset($missing) && in_array('checkindate', $missing)) { ?>Por favor, selecione o escriba la fecha de llegada <?php } ?> Hora de llegada7:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:00 Fecha de salida <?php if (isset($missing) && in_array('checkoutdate', $missing)) { echo 'value="'.htmlentities($_POST['checkoutdate']).'"'; } ?> /> <?php if (isset($missing) && in_array('checkoutdate', $missing)) { ?>Por favor, seleccione o escriba la fecha de salida <?php } ?> Hora de salida7:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:00 Adultos012345678910 Ni?os menores de 4 a?os012345678910 Ni?os entre 4 y 10 a?os012345678910 Comentarios <?php if (isset($missing) && in_array('comments', $missing)) { ?>Por favor escriba sus comentarios<?php } ?><?php if (isset($missing)) { echo htmlentities($_POST['comments']); } ?> Edited September 7, 2009 by edoplaza Quote
bishwadeep Posted September 8, 2009 Report Posted September 8, 2009 Hi edoplaza, Since I dont have all the files you have used, I could not test it properly, But i think you can change the values in the $expected array to meet your requirements. For example: $expected = array('name', 'telefono', 'email','checkindate', 'checkintime', 'checkoutdate', 'checkouttime','adults', 'under4', 'between4and10','comments'); Change the name to Name and telefono to Telephone Number etc. Then try once and let me know. Quote
edoplaza Posted September 8, 2009 Author Report Posted September 8, 2009 Hi bishwadeep, I only use two files, and I fully posted them in my previous message. The first one is called contacto9.php the sencond one is called process_mail.inc.php. There is nothing more. If you need me to send you the files, I will. I changed what you suggested but it didn't work. I changed one field, just to try: where it says: $expected = array('name', 'telefono', 'email','checkindate', 'checkintime', 'checkoutdate', 'checkouttime','adults', 'under4', 'between4and10','comments'); I changed it to: $expected = array('name', 'telefono', 'email','checkindate', 'checkintime', 'checkoutdate', 'checkouttime','adults', 'under4', 'between 4 and 10 years','comments'); On the mail message I get: between 4 and 10 years: not selected. Notice this variable on the code: p> Ni?os entre 4 y 10 a?os 0 1 2 3 4 5 6 7 8 9 10 The variable "between4and10" is written several times and I think it has to match the variable in the array. Maybe, there is a way to convert each variable of the "expected" array into strings. Greetings, Eduardo Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.