PDA

View Full Version : PHP and TextField bug... help!


SmoothCanvas
09-27-2007, 11:15 PM
I have built forms that uses php to send e-mails... Everything works just fine except for the textArea. The typed content is not being collected and sent. I do not know what I am forgetting. I have double checked the spelling and retyped lines in case there is something attached to the pasted words. In Dreamweaver the textfields that do not work are set to multi-line and the wrap is set to default.

php code is below:

<?PHP

{
$to = "dhuang@spicenet.net";
$subject = "Levinson website Self Assessment Form submission";
$message = "Your Name: " . $_POST['theName'];
$message .= "\n\nSeminar Date: " . $_POST['date'];
$message .= "\n\nHow you relate to people: " . $_POST['Relates'];
$message .= "\n\nYour managerial practices: " . $_POST['Practices'];
$message .= "\n\nYour knowledge of organizational systems:" . $_POST['Knowledge'];
$message .= "\n\nI am most effective when: " . $_POST['Effective'];
$message .= "\n\nI tend to have difficulties in the following areas: " . $_POST['Difficulties'];
$message .= "\n\nOthers tell me I can improve by: " . $_POST['Improve'];


$sentOk = mail($to,$subject,$message);
if($sentOk){
echo header ("Location:thankyou.html");
}else{
echo "sentError=" . $sentError;
}
}
?>

tux
09-28-2007, 09:59 AM
Not sure if I can help but maybe if you post the code for the form too someone may see an error.

Good luck!

SmoothCanvas
09-28-2007, 05:15 PM
<form action="self_assessment.php" method="post" name="form1" target="_self" id="form1">
<label><strong>Your Name:</strong>
<input name="theName" type="text" id="theName" />
</label>
<p>
<label><strong>Seminar Date:</strong>
<select name="date" id="date">
<option selected="selected">please select</option>
<option value="October 2007">October 2007</option>
<option value="November 2007">November 2007</option>
<option value="March 2008">March 2008</option>
<option value="May 2008">May 2008</option>
</select>
</label>
</p>
<p>
<label></label>
Effective managers and leaders need skills in their own technical or professional areas, but they also need:<br />
&bull; To understand people<br />
&bull; To manage effectively<br />
&bull; To understand the organizational systems in which they operate<br />
</p>
<p>We would like you to consider, and write a few sentences about:</p>
<p><strong>1. How you relate to people</strong></p>
<p>Consider such issues, for example, as<br />
&bull; How well you &quot;size up&quot; people<br />
&bull; How you work with, and enjoy working with, others<br />
&bull; How much you understand others' motivations, and why they do the things they do</p>
<p>
<label>
<textarea name="Relates" cols="50" rows="5" id="Relates"></textarea>
</label>
</p>
<p><strong>2. Your managerial practices</strong></p>
<p>Consider such issues, for example, as<br />
<span class="style14">&bull;</span> How you plan and communicate those plans to others<br />
<span class="style14">&bull;</span> How you assign tasks and monitor them<br />
<span class="style14">&bull;</span> How/whether you provide feedback, both positive and negative, and develop your people</p>
<p>
<label>
<textarea name="Practices" cols="50" rows="5" id="Practices"></textarea>
</label>
</p>
<p><strong><br />
3. Your knowledge of organizational systems</strong></p>
<p>Consider such issues, for example, as how well you<br />
<span class="style14">&bull;</span> Align your work in an organizational context<br />
<span class="style14">&bull;</span> Work across functions<br />
<span class="style14">&bull;</span> Approach systems&mdash;compensation, appraisal, career development, etc.</p>
<p>
<label>
<textarea name="Knowledge" cols="50" rows="5" id="Knowledge"></textarea>
</label>
</p>
<p>Please complete the following statements as well.<br />
</p>
<p><strong>4. I am most effective when: </strong></p>
<p>
<label>
<textarea name="Effective" cols="50" rows="5" id="Effective"></textarea>
</label>
</p>
<p><strong>5. I tend to have difficulties in the following areas: </strong></p>
<p>
<label>
<textarea name="Difficulties" cols="50" rows="5" id="Difficulties"></textarea>
</label>
</p>
<p><strong>6. Others tell me I can improve by: </strong></p>
<p>
<label>
<textarea name="Improve" cols="50" rows="5" id="Improve"></textarea>
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
<label>
<input name="reset" type="reset" id="reset" value="Reset" />
</label>
</p>
</form>