Jump to content


Photo

contact form help


  • Please log in to reply
4 replies to this topic

#1 ztros

ztros
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 18 May 2006 - 06:19 AM

I am trying to create a contact form where they enter the info and it sends the info to a specified email address. it sends the email, but the subject and message are blank. can anyone help take a look and tell me where i went wrong? thanks.


[a href=\"http://www.anteinc.com/AIcontact.php\" target=\"_blank\"]http://www.anteinc.com/AIcontact.php[/a] is the page location

#2 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 18 May 2006 - 07:42 AM

please show us the code. we can't see your code from the link, as it is parsed on the server.
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#3 ztros

ztros
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 18 May 2006 - 08:41 AM

<html><style type="text/css">
<!--
body {
background-color: #595E5E;
}
body,td,th {
color: #FFFFFF;
font-family: BankGothic Md BT;
}
a:link {
color: #F26522;
}
a:visited {
color: #F26522;
}
a:hover {
color: #946016;
}
a:active {
color: #F26522;
}
.style2 {color: #F26522}
.style3 {
font-family: "Amazone BT";
color: #F26522;
font-size: 24px;
}
.style4 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
<div>
<form method="post" action="<?=$PHP_SELF; ?>">
</form>
</div>
<table width="748" border="3" align="center">
<tr>
<th width="373" scope="col"><img src="http://71.18.36.32/images/shield copy.png" width="305" height="422"></th>
<th width="355" scope="col"><p align="center"><span class="style3">A</span>t Ante Inc<span class="style2"><strong>.,</strong></span> maintaining the highest possible level of efficency is a never ending goal for ourselves and our clients alike<span class="style2"><strong>.</strong></span></p>
<p align="center"><span class="style3">T</span>aking advantage of our services will enable you to spend more time fine<span class="style2"><strong>-</strong></span>tuning your business<span class="style2"><strong>,</strong></span> and less time trying to perfectly code various sections of your website<span class="style2"><strong>.</strong> </span></p>
<p align="center"><span class="style3">T</span>hank you<span class="style2"><strong>,</strong></span> in advance<span class="style2"><strong>,</strong></span> for your feedback<span class="style2"><strong>!</strong></span></p></th>
</tr>
<tr>
<th colspan="2" scope="row"><span class="style2">Please Fill out the following form and click on submit<span class="style4">.</span>expect a response in 2<span class="style4">-</span>3 days<span class="style4">.</span></span></th>
</tr>
<tr>
<th height="247" scope="row"><p>Name<span class="style2"><strong>:</strong></span></p>
<input name="name" type="text" />
<p>Email<span class="style2"><strong>:</strong></span></p>
<input name="email" type="text" />
<p>Subject<span class="style2"><strong>:</strong></span></p>
<input name="subject" type="text" />
<div>
<form method="post" action="<?=$PHP_SELF; ?>">
<input name="submit" type="submit" class="style2" value="Send" />
<input type="hidden" name="do" value="send" />
<input name="reset" type="reset" class="style2" value="Reset" />
</form>
</div>
<?


$do = ($_POST['do']);

if($do == "send")
{
$recipient = "ztros@anteinc.com";
$subject = ($_POST['subject']);
$name = ($_POST['name']);
$email = ($_POST['email']);
$message = ($_POST['message']);
$formsend = mail("$recipient", "$subject", "$message", "From: $email ($name)\r\nReply-to:$email");

echo ("<p>Your message was submitted!</p>");
}
?>
<p>&nbsp;</p> </th>
<th height="247" scope="row"><p>Message<span class="style2"><strong>:</strong></span></p>
<p>
<textarea name="message" rows="6"></textarea>
</p>
<p>&nbsp;</p>
<p> If you have problems with this form <a href="mailto:ztros@anteinc.com">click here</a> to submit feedback<span class="style2"><strong>.</strong> </span></p></th>
</tr>
</table>
</html>

#4 ztros

ztros
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 20 May 2006 - 08:05 AM

anyone?

#5 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 20 May 2006 - 04:21 PM

You HTML code is so full of errors that it's amazing it even works.

The proper format of an HTML files is
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
<html>
<head>
<title></title>
any style tags go here
</head>
<body>
</body>
</html>
[/quote]
You are missing the <head></head> and the <body></body> tags.
Make one form that encompasses all of your form tags. You have two or three.

If you had tried to validate your HTML, you would have found these errors.

Correct your HTML and your form should work.

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users