Bigbruin.com
Home :: Reviews & Articles ::
Forum :: Info :: :: Facebook :: Youtube :: RSS Feed
Search  :: Register :: Log in
View Single Post  Topic: Anyone know PHP? 
Author Message
Modulok
Rated XXX


PostPosted: Tue, 07 Nov 2006 15:44:09    Post Subject: Anyone know PHP? Reply with quote

I'm wondering if anyone knows how to define variables in a PHP module for IIS. (Apache does this automatically, but the host for my work web site is Windows) I included a sample of the errors.

Code:
Notice: Undefined variable: msg in E:\InetPub\wwwroot\domain.com\survey\sendmailsurvey.php on line 17

Notice: Undefined variable: name in E:\InetPub\wwwroot\domain.com\survey\sendmailsurvey.php on line 35


and here is the whole php doc
Code:
<?

#**************************************************************************************************************************************

# PHP Send Mail Script                                                                                      *

# The following script takes the information that a users inputs into the form and is mailed to the addresse(s) listed below.   *

#**************************************************************************************************************************************



$MailTo = "user@domain.com"; //email the results are sent to sepearted with a comma

$MailSubject = "Customer Satisfaction Survey - 2006"; //subject field

$msg .= "

<script language=\"JavaScript\" type=\"text/JavaScript\">

alert(\"Your Information has been submitted.  Thank you for your time.\")

window.location=\"http://www.domain.com\";

</script>

";  //this is the javascript message that appears after the form is submitted.



/* Fields that are sent in the main body of the message.  These can be edited but must match the name field on the form. */



if ($name == ""){



}

else {

     $MailBody = "Name:\n-$name\n";

}

if ($company == ""){



}

else {

     $MailBody .= "Company:\n-$company\n";

}

if ($title == ""){



}

else {

     $MailBody .= "Title:\n-$title\n";

}




if ($address == ""){



}

else {

     $MailBody .= "Address:\n-$address\n";

}

if ($email == ""){



}
else {

     $MailBody .= "Email:\n-$email\n";

}

if ($telephone == ""){



}

else {

     $MailBody .= "Telephone Number:\n-$telephone\n";

}

if ($cust1 == ""){



}

else {

     $MailBody .= "Our ability to accurately process your order:\n-$cust1\n";

}


if ($cust2 == ""){



}

else {

     $MailBody .= "The ways questions / special requests are handled:\n-$cust2\n";

}


if ($time1 == ""){



}

else {

     $MailBody .= "Adequacy of our standard lead times:\n-$time1\n";

}


if ($time2 == ""){



}

else {

     $MailBody .= "Ability to deliver product on promise dates:\n-$time2\n";

}


if ($responsive == ""){



}

else {

     $MailBody .= "Adequacy of our response time:\n-$responsive\n";

}


if ($package == ""){



}

else {

     $MailBody .= "Ability to package products to prevent shipping damage:\n-$package\n";

}


if ($quality1 == ""){



}

else {

     $MailBody .= "Ability to consistently deliver defect free products:\n-$quality1\n";

}


if ($quality2 == ""){



}

else {

     $MailBody .= "Ability to deliver correct quantity:\n-$quality2\n";

}


if ($price1 == ""){



}

else {

     $MailBody .= "Is our product and service competitively priced compared to companies delivering similar products:\n-$price1\n";

}


if ($price2 == ""){



}

else {

     $MailBody .= "Are you receiving good value (product & service) for the price:\n-$price2\n";

}


if ($overall == ""){



}

else {

     $MailBody .= "How do you rate Weiss-Aug as a supplier:\n-$overall\n";

}


if ($improvement == ""){



}

else {

     $MailBody .= "Please tell us if there are any areas regarding our products & service in need of improvement:\n-$improvement\n";

}


if ($competitor1 == ""){



}

else {

     $MailBody .= "Competitor:\n-$competitor1\n";

}


if ($rating1 == ""){



}



else {

     $MailBody .= "Competitor Rating:\n-$rating1\n";

}

if ($competitor2 == ""){



}



else {

     $MailBody .= "Competitor:\n-$competitor2\n";

}

if ($rating2 == ""){



}



else {

     $MailBody .= "Competitor Rating:\n- $rating2\n";

}


if ($competitor3 == ""){



}

else {

     $MailBody .= "Competitor:\n-$competitor3\n";

}

if ($rating3 == ""){



}



else {

     $MailBody .= "Competitor Rating:\n-$rating3\n";

}


//Send message code

{

mail($MailTo, $MailSubject, $MailBody, "From: $email");

}

?>

<html>

<head>

<title>Thank You</title>

</head>



<body>

<? echo "$msg" ; ?>

</body>

</html>



Last edited by Modulok on Wed, 08 Nov 2006 13:07:01; edited 2 times in total
View user's profile Send private message

Contact Us :: On Facebook :: On Youtube :: Newsletter :: RSS Feed :: FAQ :: Links :: Sponsors :: Privacy Policy
Copyright © 2000 - 2023 Bigbruin.com - All rights reserved