[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Cache Form Data - PHP

Asked by vetted in PHP and Databases, WebApplications

Tags: PHP, IE6 & 7

I have a form that has certain required fields.  The required fields are text boxes (Name, Phone, Email) and text areas (Comments, Inquiry, etc.).  If a user misses a required field, all of the data in the text boxes are cached and does not have to be retyped.  All data in the text areas have to be retyped.  How can I make it all cache and not just the text boxes?

The rest of the code not added is just the form with a Submit button.  Let me know if you need it.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
<?php
// Config
define("TO_EMAIL", $_POST['email']);
define("CC_EMAIL", "");
define("BCC_EMAIL", "");
define("FROM_EMAIL", "");
define("SUBJECT", "");
define("REDIRECT_URI", "../response.html");
// End Config
 
// Message Template
$message .= "<html>\n";
$message .= "<body>\n";
$message .= "<p>this is my message</p>
$message .= "<p>".stripslashes($_POST['suggestions'])."</p>\n";
$message .= "</body>\n";
$message .= "</html>\n";
// End Template
 
 
// Check for post data
if ($_POST) {
 
// Validate
	if (strlen($_POST['requestor_name']) < 1) {
		$error .= "Please enter the Requestor Name.<br />\n";
	}
	if (strlen($_POST['company']) < 1) {
		$error .= "Please enter your Company Name.<br />\n";
	}
	if (strlen($_POST['address']) < 1) {
		$error .= "Please enter the Address.<br />\n";
	}
	
			if (strlen($_POST['facts_surrounding_request']) < 1) {
		$error .= "Please enter the facts surrounding the request.<br />\n";
	}
			if (strlen($_POST['requested_objectives']) < 1) {
		$error .= "Please enter the requested objectives.<br />\n";
	}
 
	
	if (!$error) {
		$headers  = "MIME-Version: 1.0\r\n";
		$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
		$headers .= "From: ".FROM_EMAIL."\r\n";
		if (!CC_EMAIL=="")  $headers .= "CC: ".CC_EMAIL."\r\n";
		if (!BCC_EMAIL=="")  $headers .= "BCC: ".BCC_EMAIL."\r\n";
		$headers .= "Reply-To: ".$_POST['email']."\r\n";
		$headers .= "X-Mailer: PHP/".phpversion()."\r\n";
		
		// Send It!
		mail(TO_EMAIL, SUBJECT, $message, $headers);
		
		// Redirect
		header("Location: ".REDIRECT_URI);
	}
}
 
?>
[+][-]11/19/08 10:27 AM, ID: 22997081Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/19/08 10:34 AM, ID: 22997146Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/19/08 11:12 AM, ID: 22997504Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/19/08 01:35 PM, ID: 22998854Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/19/08 01:46 PM, ID: 22998970Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: PHP and Databases, WebApplications
Tags: PHP, IE6 &amp; 7
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: A
 
[+][-]11/19/08 01:56 PM, ID: 22999094Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/19/08 03:10 PM, ID: 22999736Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_2_20070628