Hello
I am trying to run an exit survey when people leave my website. I really have no Idea how to got about it, so I have been piecing together PHP code and HTML. Hear is what I got so far.
<p>Thank you for visiting Niland's Place Campsite today. I notice that you didn't complete your purchase today. Could you answer four quick questions to help us understand why?</p>
<blockquote>
<p>I chose not to complete the purchase today because: (select top 3 reasons)</p>
<input name="OrderTotalHigh" type="checkbox" value="1" />
Order total was higher than I expected <br />
<input name="ShippingHigh" type="checkbox" value="1" />
Cost of shipping too high <br />
<input name="OutOfStock" type="checkbox" value="1" />
Products out of stock <br />
<input name="PersonalInfo" type="checkbox" value="1" />
Too much personal information requested <br />
<input name="WebsiteSecurity" type="checkbox" value="1" />
Concerned about the website's security <br />
<input name="ChangeMind" type="checkbox" value="1" />
Changed mind about products <br />
<input name="Comparison" type="checkbox" value="1" />
Comparison shopping <br />
<input name="PurchaseLater" type="checkbox" value="1" />
Will purchase later <br />
<input name="CheckoutLong" type="checkbox" value="1" />
Checkout process is too long <br />
<input name="CheckoutConfusing" type="checkbox" value="1" />
Checkout process is confusing <br />
<input name="Navigation" type="checkbox" value="1" />
Poor site navigation <br />
<input name="ProductInfo" type="checkbox" value="1" />
Insufficient product information <br />
<input name="UnclearDelivery" type="checkbox" value="1" />
Site unclear on delivery times <br />
<input name="OrderTracking" type="checkbox" value="1" />
No order tracking </blockquote>
That is the HTML I want to use. the value in the database is 1 BOOL for every item checked. I have constructed a PHP file to connect with the database. but all I get is the login page.
<?php
$DBhost = "supremecenter48.com ";
$DBuser = "makoshark";
$DBpass = "xxxxxxx";
$DBName = "makoshark_survey";
$table = "exit_reason";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select
database $DBName");
?>
Next I need a way to input the date, and then insert a 1 (true) for each checkbox. Here are the corresponding fields
CREATE TABLE `exit_reason` (
`date` DATE NOT NULL,
`WebPath` VARCHAR(255) NOT NULL,
`OrderTotalHigh` BOOL DEFAULT '0' NOT NULL,
`ShippingHigh` BOOL DEFAULT '0' NOT NULL,
`OutOfStock` BOOL DEFAULT '0' NOT NULL,
`PersonalInfo` BOOL DEFAULT '0' NOT NULL,
`WebsiteSecurity` BOOL DEFAULT '0' NOT NULL,
`ChangeMind` BOOL DEFAULT '0' NOT NULL,
`Comparison` BOOL DEFAULT '0' NOT NULL,
`PurchaseLater` BOOL DEFAULT '0' NOT NULL,
`CheckoutLong` BOOL DEFAULT '0' NOT NULL,
`CheckoutConfusing` BOOL DEFAULT '0' NOT NULL,
`ProductInfo` BOOL DEFAULT '0' NOT NULL,
`UnclearDelivery` BOOL DEFAULT '0' NOT NULL,
`OrderTracking` BOOL DEFAULT '0' NOT NULL,
`cart_empty` BOOL DEFAULT '0' NOT NULL,
`Item` VARCHAR(255) NOT NULL,
`index` INT(255) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`date`),
INDEX (`index`)
)
TYPE = myisam
And lastly the item they were looking at from my zen cart and Or if the cart was emty
Thanks