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 = "" ;
$mailto = "" ;
// $subject - set to the Subject line of the email, eg

$subject = "Short Sale Property Form" ;
// the pages to be displayed, eg
//$formurl = "" ;
//$errorurl = "" ;
//$thankyouurl = "" ;
$formurl = "" ;
$errorurl = "" ;
$thankyouurl = "" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$propertytype = $_POST ;
$propertystatus = $_POST ;
$foreclosurestatus = $_POST ;
$city = $_POST ;
$state = $_POST ;
$zip_code = $_POST ;
$bedrooms = $_POST ;
$bathrooms = $_POST ;
$sf = $_POST ;
$mortgages = $_POST ;
$forsale = $_POST ;
$lisitngprice = $_POST ;
$bankruptcy = $_POST ;
$paidtax = $_POST ;
$wishsell = $_POST ;
$repairs = $_POST ;
$mortgagebalance = $_POST ;
$fmv = $_POST ;
$howfind = $_POST ;
$referrer = $_POST ;
$name = $_POST ;
$email = $_POST ;
$comments = $_POST ;
$http_referrer = getenv( "HTTP_REFERER" );
$headers = 'From: [EMAIL="info@shortsalefaq.com'"]info@shortsalefaq.com'[/EMAIL] ;
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","");
mail($mailto, $subject, $messageproper, $headers);
header("Location: http://www.shortsalefaq.com/thankyou.html");
exit ;
?>

Dani AI

Generated

Brief expert note referencing (summary + practical fixes).

’s symptom — the form worked only from a cached copy on one machine and produced a 404 for everyone else — is exactly the classic “resource not found” response from the server, not a browser-only error. (developer.mozilla.org)

Common causes when a site is moved or the hosting type changes (Windows/ASP → Linux/PHP):

  • The document root and upload folder differ (Windows/Plesk uses httpdocs/, cPanel/Linux uses public_html/). Files uploaded to the wrong directory will return 404. (godaddy.com)
  • Linux hosts are case‑sensitive; filenames that worked on Windows can break after a move. (learn.microsoft.com)
  • PHP handling differs by platform (Windows PHP uses SMTP.ini settings; Unix/Linux uses a local MTA/sendmail). Mail behavior that failed on one host but worked after switching is consistent with that difference. (php.net)
  • DNS or server switch propagation and browser/server caches can make one machine see an old page while others see the new server (or no file). (godaddy.com)

A short, practical troubleshooting checklist (applies to similar cases):

  • Verify the file is in the host’s active web root (create and fetch /public_html/test.txt or httpdocs/test.txt to confirm). (godaddy.com)
  • Try a different browser or incognito window and clear cache on the problem machine (cached pages can mask server-side 404s). (web.dev)
  • Rename the handler page to use .php (the simplest, most reliable fix) or ensure the server is configured to parse .html as PHP. Example (only if the host supports changing handlers):
# only use when host documentation allows it
AddHandler application/x-httpd-php .html .htm

(If unsure, prefer renaming to .php.) (icdsoft.com)

  • Check file permissions/ownership and any .htaccess rewrite rules that might rewrite or block the URL. (godaddy.com)
  • For mail reliability, review PHP’s mail() differences on Windows vs Unix hosts and consider using an authenticated SMTP library (PHPMailer, similar) if required by the host. (php.net)

’s reply is generic; this thread’s useful outcome was the rename fix reported by , which matches the common, low-effort remedies above. For durable setups, prefer .php for server-side form handlers, verify upload location and permissions, and use the PRG (Post/Redirect/Get) pattern to avoid refresh/resubmit issues. (en.wikipedia.org)

No need to respond. I fixed whatever the issue was by simply changing the file name of the form. Now it works.

your code is too big, just post your code w3 school, watch the video, u will solve your problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.