logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-24-2011, 12:50 PM   #1
Shenhua
 
Join Date: Jul 2011
Posts: 4
Default Contact page not working?

Hello all

I'm a 23 year girl from Holland and am kinda stuck with my website

To make a long story short; I've recently set up my own translation service and so far it's going okay. I made the website and am fairly satisfied but here's the problem. I can't get the contact page working properly.

When someone e-mails me using the contact page on my website I can't read the incoming e-mails. I can see their e-mail and name but the actual message is not appearing? Any of you guys know what I did wrong? I have also some e-mail links on my website and I would like people to be able to contact me using let's say outlook.

I am veeeeeeeeeeeeeery sorry for my ignorance! I don't know much about computers and trust me it's not that I want someone having to do it for me, but i'm totally stuck! Again apologies for being so ignorant on computers!

my website www.dynamic-translations.com

Contact page script
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Dynamic translations</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/arial.js"></script>
<script type="text/javascript" src="js/cuf_run.js"></script>
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
</head>
<body>
<div class="main">
  <div class="header">
    <div class="header_resize">
      <div class="menu_nav">
        <ul>
          <li><a href="index.html"><span><span>Home</span></span></a></li>
          <li><a href="support.html"><span><span>Languages</span></span></a></li>
          <li><a href="about.html"><span><span>About Us</span></span></a></li>
          <li><a href="blog.html"><span><span>Specialization</span></span></a></li>
          <li class="active"><a href="contact.html"><span><span>Contact Us</span></span></a></li>
        </ul>
      </div>
      <div class="clr"></div>
      <div class="logo">
        <h1><a href="index.html">Dynamic translations<br />
          <small>Meticulous, fast and accurate translations for you</small></a></h1>
      </div>
      <div class="clr"></div>
      <img src="images/image.jpg" width="930" height="160" alt="" />
      <div class="clr"></div>
    </div>
  </div>
  <div class="content">
    <div class="content_resize">
      <div class="mainbar">
        <div class="article">
          <h2>Contact</h2>
          <p class="style1">Please feel free to contact us for any questions regarding our language pairs, quotes, specializations or any other questions. We will try to reply you as soon as possible.</p>
        </div>
        <div class="article">
          <h2>Send us mail</h2>
          <form action="contactformprocess.php" method="post" id="contactform">
            <ol>
              <li>
                <label for="name">Name (required)</label>
                <input id="name" name="name" class="text" />
              </li>
              <li>
                <label for="email">Email Address (required)</label>
                <input id="email" name="email" class="text" />
              </li>
              <li>
                <label for="website">Website</label>
                <input id="website" name="website" class="text" />
              </li>
              <li>
                <label for="message">Your Message</label>
                <textarea id="message" name="message" rows="8" cols="50"></textarea>
              </li>
              <li>
                <input type="image" name="imageField" id="imageField" src="images/submit.gif" class="send" />
                <div class="clr"></div>
              </li>
            </ol>
          </form>
        </div>
      </div>
      <div class="sidebar">
        <div class="searchform"></div>
        <div class="gadget"></div>
        <div class="gadget">
          <h2 class="star">&nbsp;</h2>
        </div>
      </div>
      <div class="clr"></div>
    </div>
  </div>
  <div class="fbg">
    <div class="fbg_resize">
      <div class="col c1">
        <h2>&nbsp;</h2>
      </div>
      <div class="col c2">
        <h2>&nbsp;</h2>
      </div>
      <div class="col c3">
        <h2>&nbsp;</h2>
      </div>
      <div class="clr"></div>
    </div>
  </div>
  <div class="footer">
    <div class="footer_resize">
      <p class="lf">&copy; Copyright Dynamic translations. Designed byDynamic translations<a href="http://www.bluewebtemplates.com/"></a></p>
      <ul class="fmenu">
        <li><a href="index.html">Home</a></li>
        <li><a href="support.html">Languages</a></li>
        <li><strong>Specialization</strong><a href="about.html">About Us</a></li>
        <li class="active"><a href="contact.html">Contact</a></li>
      </ul>
      <div class="clr"></div>
    </div>
  </div>
</div>
</body>
</html>

Last edited by edbr; 07-25-2011 at 12:59 AM..
Shenhua is offline   Reply With Quote
Old 07-25-2011, 12:56 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

need to see the contactformprocess.php code
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-25-2011, 03:50 PM   #3
Shenhua
 
Join Date: Jul 2011
Posts: 4
Default

aaah...my apologies....

I think this is what you mean =)

<?php

/* Email Variables */

$emailSubject = 'contactformprocess!';
$webMaster = 'info@dynamic-translations.com';


/* Data Variables */

$email = $_POST['email'];
$name = $_POST['name'];
$comments = $_POST['coments'];



$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>

Comments: $comments <br>
EOD;

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);


/* Results rendered as HTML */

$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="http://dynamic-translations.com/contact.html">
<style type="text/css">
<!--
body {
background-color:#66CCFF ;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #000000 ;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}

-->
</style>
</head>
<div align="center"> Thank you! Your email will be answered as soon as possible
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Shenhua is offline   Reply With Quote
Old 07-26-2011, 01:05 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

easiest would be to change
$comments = $_POST['coments'];
to $comments = $_POST['message'];.
each form value is passed as a $_POST variable. for example website is another one so its value will be passed as
$_POST['website'];

so if you add $website = $_POST['website '];.

and in your html part of the mail add
Website Email: $website <br> you will get that also
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-27-2011, 08:40 PM   #5
Shenhua
 
Join Date: Jul 2011
Posts: 4
Default

Thanks,

Will try that! I'll let you know how things turn out to be =)
Shenhua is offline   Reply With Quote
Old 07-28-2011, 01:46 PM   #6
Shenhua
 
Join Date: Jul 2011
Posts: 4
Default

Thank you so much,

Works like a charm. I can now continue my work without having to worry much about not being able to read my clients messages.

Thanks!
Shenhua is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:56 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com