Page 1 of 1

Survey php page problem !

Posted: Thu Aug 14, 2008 6:00 pm
by adokilla
am one of the noob at my company they asked me to help with some web development am not a pro in php i need some help if any one can asap if i could get it. the survey works ok, but the problem is that it doesn't send it to my email which i want to so when i go and fill out the form and press send now i get a thank you message so my email was send but i dont really get the email send, here is my code

<form action="sendsurvey.php" method="post" name="form1" id="form1" onSubmit="return ValidateData();">
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td colspan="3"><strong>Please rate
<?=pagetitle; ?>
in the following as applicable</strong>:<br>
<br>
<br> </td>
</tr>
<tr>
<td colspan="2"><strong>Contact Information</strong> </td>
<td width="49%">&nbsp;</td>
</tr>
<tr>
<td width="2%">&nbsp;</td>
<td width="49%">Name:</td>
<td><input name="txtname" type="text" id="txtname" size="40"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Company:</td>
<td><input name="txtcompanyname" type="text" id="txtcompanyname" size="50"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Address:</td>
<td><input name="txtaddress1" type="text" id="txtaddress1" size="50"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Address 2:</td>
<td><input name="txtaddress2" type="text" id="txtaddress2" size="50"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Phone:</td>
<td><label>
<input name="txtphone" type="text" id="txtphone">
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>City/Town:</td>
<td><input name="txtcity" type="text" id="txtcity" size="30"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>State:</td>
<td><label>
<input name="txtstate" type="text" id="txtstate" size="30">
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Zip/Postal Code:</td>
<td><input name="txtzipcode" type="text" id="txtzipcode"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Country:</td>
<td><input name="txtcountry" type="text" id="txtcountry" size="30"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2"><strong> Email Address </strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input name="txtemail" type="text" id="txtemail" size="70"></td>
</tr>

<tr>
<td colspan="3">
<? $cls = new SurveyOptions;
$cls->ctrname = array('overallproduct', 'productperformance', 'workmanship');
$cls->arr_labels = array('Overall Product Reliability and Durability', 'Product Performance', 'Workmanship');
$cls->comments = "5 = Excellent; 1 = Poor";
$cls->CreateTable("1 Product Quality");
//echo "<br><br>";

$cls->comments = "";
$cls->ctrname = array('deliveryperformance', 'unitcondition', 'productmanual');
$cls->arr_labels = array('Delivery Performance', 'Unit Condition', 'Product Manual');
$cls->CreateTable("2. Product Delivery");
//echo "<br><br>";
$cls->ctrname = array('saleperformance', 'technicalcompetency');
$cls->arr_labels = array('Performance', 'Technical Competency');
$cls->CreateTable("3. Sales Representitive");
//echo "<br><br>";
$cls->ctrname = array('orderexperience', 'communication', 'courteoustreatement' ,'technicalsupport');
$cls->arr_labels = array('Ordering Experience', 'Communication','Courteous Treatment', 'Technical Support');
$cls->CreateTable("4. Customer Service");
//echo "<br><br>";
$cls->ctrname = array('productfeatures', 'productquality', 'deliverytime' ,'competitiveprice');
$cls->arr_labels = array('Product Features', 'Product Quality','Delivery Time', 'Competitive Prices');
$cls->CreateTable("5. In Comparison to La Marche's Competitors");

?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2"><strong>6. Where did you hear about La Marche ?</strong> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><table width="80%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="9%"><input name="chkhearabout[]" type="checkbox" id="chkhearabout" value="Existing Customer "></td>
<td width="91%">Existing Customer </td>
</tr>
<tr>
<td><input name="chkhearabout[]" type="checkbox" id="chkhearabout" value="Word of mouth "></td>
<td>Word of mouth </td>
</tr>
<tr>
<td><input name="chkhearabout[]" type="checkbox" id="chkhearabout" value="Sales Representative "></td>
<td>Sales Representative </td>
</tr>
<tr>
<td><input name="chkhearabout[]" type="checkbox" id="chkhearabout" value="Internet"></td>
<td>Internet</td>
</tr>
<tr>
<td><input name="chkhearabout[]" type="checkbox" id="chkhearabout" value="Trade Show"></td>
<td>Trade Show </td>
</tr>
<tr>
<td><input name="chkhearabout[]" type="checkbox" id="chkhearabout" value="Product Datasheet "></td>
<td>Product Datasheet </td>
</tr>
<tr>
<td><input name="chkhearabout[]" type="checkbox" id="chkhearabout" value="Magazine"></td>
<td>Magazine</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><strong>7. What are your anticipated future product
requirements? </strong></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input name="txtfuturerequirement" type="text" id="txtfuturerequirement" size="50"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><strong>8. How can we improve our products or services? </strong></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><textarea name="txtimprove" cols="50" rows="10" id="txtimprove"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input type="submit" name="Submit" value="Send Now" class="button_gray"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
</table>
</form>

this is the survey it self now is the code for send survey

<?
require_once("inc/generate_clientid.php");
include("inc/sessionstart.php");
include("inc/connect.php");
include("classes/cls_mail.php");
include("sendsurvey_inc.php");
if($_POST['txtname'] != '') {

} else {
gotopage('index.php');
}

any help would appreciate alot thank you.

Re: Survey php page problem !

Posted: Tue Sep 09, 2008 4:42 am
by shaneiadt
Is the mail function configured correctly?

You have to set it up in the php.ini file to use your SMTP server.....protocol name, ip, password (if applicable)...etc.