Jump to content

panther71

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by panther71

  1. Chandler: Many many thanks! After looking at the article you pointed out, a little re-writing of my script and the eventual correction of a capital T, it all works 100% :D Thank you once again Simon
  2. Hi Chandler, many many thanks. Even after a cursory flick throught he tutorial, I now see what error I made and what to do to fix it. I will post back as soon as I have done the necessary
  3. I get an error in the browser of: Server error The website encountered an error while retrieving http://fesatest.co.uk/fesatest.php. It may be down for maintenance or configured incorrectly. Here are some suggestions: Reload this web page later. I dont get the error if i comment out my add-in and use the original Thanks Chandler, I will check out the video you suggested.
  4. Hi The email address in the script is actually a dummy one, also, the form is configured to validate itself before it posts, so all fields are required in order for the form to successfully post itself, otherwise the user gets an error. Simon
  5. hi Sorry, thought attaching it would be ok. Many thanks Simon <?php # Subject and enail Values $emailSubject = 'Webenquiry from Fesa.co.uk'; $EmailTo = 'panther@fesatest.co.uk'; # switch($_POST["type"]){ $EmailTo = 'info@fesatest.co.uk'; case "info": $EmailTo = 'procu@fesatest.co.uk'; case "procu": $EmailTo = 'sales@fesatest.co.uk'; case "sales": $EmailTo = 'it@fesatest.co.uk'; case "it": $EmailTo = 'trans@fesatest.co.uk'; case "trans": $EmailTo = 'hr@fesatest.co.uk'; case "hr": $EmailTo = 'quality@fesatest.co.uk'; case "quality":} # Gathering Data Variables $emailField = $_POST['email']; $nameField = $_POST['name']; $companyField = $_POST['company']; $deptField = $_POST['dept']; $commentField = $_POST['comment']; $body = <<<EOD <br><hr><br> Email: $emailField <br> Name: $nameField <br> Company: $companyField <br> Attn: $deptField <br> Comments: $commentField <br> EOD; $headers = "From: $emailField\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($EmailTo, $emailSubject, $body, $headers); # Results rendered as HTML $theResults = <<<EOD <html> <head> <meta http-equiv="refresh" content="3;URL=http://fesatest.co.uk/contact.html"> <title>Success!!</title> <style type="text/css"> <!-- body { background-color: #FFF; background-image: url(Images/bgf2.jpg); background-repeat: repeat-x; left: auto; right: auto; clip: rect(auto,auto,auto,auto); text-decoration: none; font-size: 36px; color: #000000; } </style> </head> <div> <div align="center">Success! We Have received your form successfully. Please wait until the page re-directs you.</div> </div> </body> </html> EOD; echo "$theResults"; ?>
  6. Hi there. I was wondering if anyone out there could help me out a little. I am trying to build a contact form for our website, and the form itself works OK. It posts various details to a PHP script that turns it all into an email, then the PHP re-directs back to the contact page. Now all of this works fabulously. I have grabbed the working script from Nate over at Tutvid - a truly wonderful guy with some great video tutorials. My problem is this: I have a drop down box that the user can specify which department they would want to contact, there are 7 options. I want to send the email to the department chosen. Now, to that end I have found another script that says it will do this and I tried to merge it in, but when I type it in to Dreamweaver it says it has a script error and wont run. I have attached the PHP script file, I have also commented out the section that has the error, and left in the section that actually works. I am using Dreamweaver CS5.5, Windows Server 2008 with Exchange 2007 running on it, and all the web stuff is served with IIS. I really do not want to have to create a database to do this, and I do not want to fudge my install of exchange either, I simply want to send an email to a recipient based on a drop down. I should point out that this is my first foray into the world of PHP/HTML/CSS, and I think I have a reasonable handle on it for a first time learner, but I seem to have hit a bit of a wall on this one, so any help would be greatly appreciated. Many thanks in anticipation Simon [attachment deleted by admin]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.