User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Site Layout and Usability section within the Web Development category of DaniWeb, a massive community of 426,400 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,299 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Site Layout and Usability advertiser: Programming Forums
Views: 2956 | Replies: 1
Reply
Join Date: Oct 2006
Posts: 2
Reputation: eric3 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
eric3 eric3 is offline Offline
Newbie Poster

Need help with form - Host - Go daddy

  #1  
Oct 21st, 2006
I do not know much code but have figured out alot of the past day setting up my first site but now I am perplexed and need help.

I created the html code using NVU and like it. The issue is with a form I created to gather some information from visitors and e-mail it to myself.
I used the Form wizard to create the initial bits of PHP script. After much trial and erro and a free trial of a PHP debugger, I finally got the form to work properly.

However, when I tested the website, the form did everything perfectly EXCEPT it did not send the e-mail as the script told it to. I started to wonder if the economy go daddy wouldn't allow it. After some time with google, I discovered that go daddy has an "economy w/ASP" and an "economy w/PHP" and that I should switch to PHP, so I did so and waited several hours for the switch to happen.

When I tested the website again, IT WORKED and the e-mail was SENT. Everything looked great until I hit the refresh button on the form and it said 404 error. After some testing on other computers I realize that the form page is not coming up at all now. It just works on the one PC because the form is still in the cache from before. The home page still works just fine.

So I am completely confused. I know the "form.html" is uploaded since I used it prior to the switch and I "see" it on the host.
I know the PHP script works since it works on the cached form on my PC.

Any clues would be appreciated. I put the form.php text below.

Thanks Eric


// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "youremailaddress@example.com" ;
$mailto = "Info@ShortSaleFAQ.com" ;
// $subject - set to the Subject line of the email, eg

$subject = "Short Sale Property Form" ;
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://www.ShortSaleFAQ.com/form.html" ;
$errorurl = "http://www.ShortSaleFAQ.com/error.html" ;
$thankyouurl = "http://www.ShortSaleFAQ.com/thankyou.html" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$propertytype = $_POST['propertytype'] ;
$propertystatus = $_POST['propertystatus'] ;
$foreclosurestatus = $_POST['foreclosurestatus'] ;
$city = $_POST['city'] ;
$state = $_POST['state'] ;
$zip_code = $_POST['zip_code'] ;
$bedrooms = $_POST['bedrooms'] ;
$bathrooms = $_POST['bathrooms'] ;
$sf = $_POST['sf'] ;
$mortgages = $_POST['mortgages'] ;
$forsale = $_POST['forsale'] ;
$lisitngprice = $_POST['listingprice'] ;
$bankruptcy = $_POST['bankruptcy'] ;
$paidtax = $_POST['paidtax'] ;
$wishsell = $_POST['wishsell'] ;
$repairs = $_POST['repairs'] ;
$mortgagebalance = $_POST['mortgagebalance'] ;
$fmv = $_POST['fmv'] ;
$howfind = $_POST['howfind'] ;
$referrer = $_POST['referrer'] ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
$headers = 'From: info@shortsalefaq.com' ;
if (empty($name) || empty($email)) {
header( "Location: $errorurl" );
exit ;
}
$messageproper =
"Name of seller: $name\n" .
"Email of seller: $email\n" .
"Property Type: $propertytype\n" .
"Property Status: $propertystatus\n" .
"Foreclosure Status: $foreclosurestatus\n" .
"City: $city\n" .
"State: $state\n" .
"Zip Code: $zip_code\n" .
"Number of Bedrooms: $bedrooms\n" .
"Number of Baths: $bathrooms\n" .
"Square Footage: $sf\n" .
"Number of Mortgages: $mortgages\n" .
"Is house For Sale?: $forsale\n" .
"What is Listing Price: $listingprice\n" .
"In Bankruptcy?: $bankruptcy\n" .
"Paid Property tax?: $paidtax\n" .
"All Wish to Sell?: $wishsell\n" .
"Need repairs?: $repairs\n" .
"Mortgage Balance: $mortgagebalance\n" .
"Fair Market Value: $fmv\n" .
"How did you find us?: $howfind\n" .
"Name of Referrer: $referrer\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
ini_set("SMTP","smtp.comcast.net");
mail($mailto, $subject, $messageproper, $headers);
header("Location: http://www.shortsalefaq.com/thankyou.html");
exit ;
?>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Posts: 2
Reputation: eric3 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
eric3 eric3 is offline Offline
Newbie Poster

Re: Need help with form - Host - Go daddy

  #2  
Oct 21st, 2006
No need to respond. I fixed whatever the issue was by simply changing the file name of the form. Now it works.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Site Layout and Usability Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Site Layout and Usability Forum

All times are GMT -4. The time now is 1:19 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC