Jump to content

virtual

Advanced Member
  • Posts

    876
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by virtual

  1. Hi Guys, Me again with another JS question. I changed the form I was using and now have a new one, but I cannot get it to show the rest of the page and the footer which is an include in the error message. Can anyone tell me where I went wrong? Thanks Here is the script $email_to = "o****ds@comcast.net"; $email_subject = "Request from ****.com"; $close_divs = '</div></div> <div id="content-bottom"></div> <?php include ('includes/footer.php'); ?> </div><!-- END CONTENT --> </div> <!-- END CONTAINER --> </body> </html> '; function died($error) { // error code here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; echo $close_divs; die(); } // validation expected data exists if(!isset($_POST['name']) || !isset($_POST['email']) || !isset($_POST['telephone']) || !isset($_POST['comments'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $name = $_POST['name']; // required $email_from = $_POST['email']; // required $telephone = $_POST['telephone']; // not required $comments = $_POST['comments']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } if(strlen($comments) < 2) { $error_message .= 'The Comments you entered do not appear to be valid.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details sent from g****o.com: \n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Name: ".clean_string($name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Telephone: ".clean_string($telephone)."\n"; $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?>
  2. Not to worry, it was a server issue with a Windows server, I changed to Linux and it works now. @Wickham, quite right I forget to define it. Thanks for pointing that out.
  3. I have been using the same php script to process my contact form on several different sites, and all of a sudden on the latest site I am building it is not sending the email and giving me an error message. All the other sites have the same code and are functioning properly, I don't understand what is wrong with this one. Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html.'>http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\7612246\html\mailresponse.php on line 102 I checked out http://pobox.com/~djb/docs/smtplf.html and it's some article written in 1995 which I don't understand. Line 102 is this one: mail("myemail@whatever.com", $subject, $message, $from); And here is the rest of the code: <?php $ip = $_POST['ip']; $httpref = $_POST['httpref']; $httpagent = $_POST['httpagent']; $visitor = $_POST['visitor']; $visitormail = $_POST['visitormail']; $notes = $_POST['notes']; $phone = $_POST['phone']; if (eregi('http:', $notes)) { die ("Do NOT try that! ! "); } if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { echo "<h2>Please hit the Back button</h2><h2>Please Enter a valid e-mail address</h2>\n"; $badinput = "<h2>Your email was NOT sent</h2>\n"; echo $badinput; die ("<p>Use browser back button !</p>"); } if(empty($visitor) || empty($visitormail) || empty($notes )) { echo "<h2>Please hit the Back button - fill in all fields</h2>\n"; die ("<p>Use browser back button !</p>"); } $todayis = date("l, F j, Y, g:i a") ; $phone = $phone; $notes = stripcslashes($notes); $message = " $todayis [EST] \n Attention: $attn \n Message: $notes \n From: $visitor ($visitormail)\n Additional Info : IP = $ip \n Browser Info: $httpagent \n Referral : $httpref \n "; $from = "From: $visitormail\r\n"; mail("myemail@whatever.com", $subject, $message, $from); ?> <p class="mail">Thank you <?php echo $visitor ?> for expressing your interest in. Below is the information you entered on our form. We look forward to speaking with you and helping you get started on your new or existing project. </p> <p class="mail">Phone Number: <?php echo $phone ?></p> <p class="mail">Message:<br > <?php $notesout = str_replace("\r", "<br>", $notes); echo $notesout; ?> </p>
  4. I agree with LSW. Unless you are traveling all the time, a laptop is not the best computer for work purposes. I would go with a desktop, you get way more bang for your buck! Desktops are also more easily upgradeable and will serve you longer for that reason. They are also more comfortable to work on ergonomically, good seating, a larger monitor or 2 are all considerations if you are sitting in front of one 8 hours a day. Keep your netbook to show your work or just to keep in touch when on the go. Get a good processor, lots of memory, a big hard drive, but also get a backup drive. You will understand why if or when the original hard drive crashes and you have lost months/years of work. Futureproof in this field is almost impossible, goodness knows what technology will be invented in the next 2 years. A new version of software comes out every 18 months. The internet is a fast moving field to keep up in.
  5. It looks like one of those websites that goes on and on forever, not very exciting to look at or read. Graphically it is completely misaligned.
  6. Well in the real world a "wrapper" as it's name implies is something that wraps around an object and contains it e.g. "wrapping paper" In CSS it is exactly the same thing, but if you want to name it "hoodad" you can.
  7. I just replied to your other post, but Flash in this forum refers to Adobe Software not to photographic equipment. So you won't get much joy here. Post your photography questions to another forum.
  8. You would get more help on this question by taking it to a photography forum. It is indeed a vast question, lighting is essential in photography and flash provides light but there are also other considerations. Lighting is also about shadows, reflection and how they affect the subject. With a point and shoot camera, when a photo is taken from far away the flash lights the whole scene and no particular object or person. When the photo is a close up, the flash only has to light one object so you may appear "like you", but it may not necessarily be a great photo of you. Good photographers understand light and shadows and how they work and reflect off different surfaces. But they also take hundreds of shots to get the right one that is published in a magazine.
  9. Thanks for the replies guys. I understand Eddie why you don't code for it anymore as you build very large complicated sites. Mine are much smaller and usually work cross browser right off, except for IE6 and that's often the float and double margin bug. I usually write a separate style sheet for IE6 as it's not a big fix. Recently I have been running into trouble using Jquery for navigation and sliders and then trying to add a pngfix for IE6. So in that case I add a Js warning and don't bother with the pngfix.
  10. Do you still write stylesheets or CC for IE6 or IE? Do you use CSS3 markup knowing that it doesn't work in IE or do you have a work around for IE users? Do you add a js or other warning to IE6 users or do you just ignore them? I know a lot of people will reply that it depends on your target audience, but what are the actual statistics?
  11. Ok I missed the point before. I think you might have a case of "collapsed margins". http://www.complexspiral.com/publications/uncollapsing-margins/ http://reference.sitepoint.com/css/collapsingmargins
  12. I'm seeing this - Firefox 3.6
  13. Sorry I can't be of more help.
  14. Yes of course, you mean your footer doesn't stick to the bottom. Have you tried the http://ryanfait.com/sticky-footer/
  15. Just a thought, the tabs do animate, try changing the 'marginLeft'; settings to positive. Or just wait till Ben gets here and he'll sort you out quicker than I can....
  16. Are you looking at it in IE? Because I don't see your page length issue in Firefox Mac
  17. Yes I realized that after and edited my post. I'm not quite sure what is happening but they are halfway working, they slide back in on page refresh???
  18. Were they working before modifying the z-index? You might need to rearrange your calls to Jquery. CSS stylesheets come before the jQuery, and the jQuery library comes before your custom script.
  19. Remove the z-index from #wrap and give the .tabs a negative z-index.
  20. http://css-tricks.com/perfect-full-page-background-image/
  21. Wow, you are good! I tried something similar but put the li a in front of the sfHover.
  22. Sorry to bother you again, but how do I get the drop down ul li's to stay #666 and #bbb on hover. At the moment they drop down as #666 but when hovered the whole ul changes to #444 with #bbb on hover.
  23. Ben you're a genius! Thank you so much it works like a charm.
  24. OK thank you Ben, I will try that tomorrow - too late now. I got the Eddie's Superfish menu link to do what I wanted but it doesn't have easing which is the cool factor with the Sooperfish.
  25. Can you elaborate, I don't get it......
×
×
  • Create New...