logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-06-2009, 12:24 AM   #1
jessa
 
Join Date: Jan 2009
Posts: 13
Unhappy Contact Form

I've never made a contact form before and I'm trying to follow the code I found online. The submission is not actually reaching my email. You can view the form on my testing server at: http://deptart2.memphis.edu/~jwilcox...folio/home.php . Click on contact. Here is the raw code:
HTML Code:
 
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">contact</div>
<div class="AccordionPanelContent">
<div id="accordian_textholder"> 
<form action="send_results.php" method="post" enctype="text/plain" name="contact_form" id="contact_form">
<table width="860" border="0" cellpadding="4">
<tr>
<td width="130">name*</td>
<td width="194"><span id="sprytextfield1">
<label>
<input type="text" name="name" id="name2" />
</label>
<span class="textfieldRequiredMsg">A value is required.</span></span> </td>
<td width="27">&nbsp;</td>
<td width="193">project description</td>
<td width="264"><span id="sprytextarea2">
<label>
<textarea name="project" id="project" cols="30" rows="4"></textarea>
</label>
</span> </td>
</tr>
<tr>
<td>company name</td>
<td><span id="sprytextfield2">
<label>
<input type="text" name="company_name" id="company_name" />
</label>
</span> </td>
<td width="27">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>e-mail address*</td>
<td><span id="sprytextfield3">
<label>
<input type="text" name="email " id="email " />
</label>
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </td>
<td width="27">&nbsp;</td>
<td>how did you hear about creative spark?</td>
<td><span id="sprytextarea3">
<label>
<textarea name="hear_about" id="hear_about" cols="30" rows="4"></textarea>
</label>
</span> </td>
</tr>
<tr>
<td>phone number</td>
<td><span id="sprytextfield4">
<label>
<input type="text" name="phone" id="phone" />
</label>
</span> </td>
<td width="27">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>best method to reach you</td>
<td><span id="spryselect1">
<label>
<select name="email_phone" id="email_phone">
<option selected="selected">email</option>
<option>phone</option>
</select>
</label>
</span></td>
<td width="27">&nbsp;</td>
<td>&nbsp;</td>
<td><label>
<input type="submit" name="submit" id="submit" value="send request" />
</label>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div
>

Last edited by davidj; 02-06-2009 at 12:35 PM..
jessa is offline   Reply With Quote
Old 02-06-2009, 03:43 AM   #2
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

This is just the HTML. HTML cannot send email.
domedia is offline   Reply With Quote
Old 02-06-2009, 03:57 AM   #3
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,203
Default

there is a mail form on this forum (php) you could use
__________________
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 02-07-2009, 04:02 PM   #4
jessa
 
Join Date: Jan 2009
Posts: 13
Exclamation

Here is the code from my send_results.php page that is connected to my home.php page. I will try to find the form you are talking about on the site, but I would still appreciate it if you could tell me if you see the error in the current form I'm using. I'm using instructions I found online.

PHP 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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>send results</title>
</head>
<body>
<?php
//--------------------------Set these paramaters--------------------------
 
// Subject of email sent to you.
$subject 'Results from Contact form'
 
// Your email address. This is where the form information will be sent. 
$emailadd 'jessa.wilcoxen@gmail.com'
 
// Where to redirect after form is processed. 
$url 'home.php'
 
// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req '0'
 
// --------------------------Do not edit below this line--------------------------
$text "Results from Contact Form:\n\n"
$space ' ';
$line '
'
;
foreach (
$_POST as $key => $value)
{
if (
$req == '1')
{
if (
$value == '')
{echo 
"$key is empty";die;}
}
$j strlen($key);
if (
$j >= 20)
{echo 
"Name of form element $key cannot be longer than 20 characters";die;}
$j 20 $j;
for (
$i 1$i <= $j$i++)
{
$space .= ' ';}
$value str_replace('\n'"$line"$value);
$conc "{$key}:$space{$value}$line";
$text .= $conc;
$space ' ';
}
mail($emailadd$subject$text'From: '.$emailadd.'');
echo 
'<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>
</body>
</html>

Last edited by davidj; 02-07-2009 at 04:40 PM..
jessa 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 01:50 AM.


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