Weird thing happening

User 34904 Photo

Registered User
41 posts

Exported a form to a web folder on my hard drive (which will ultimately be FTP'ed to hosting site) and when I fill out the form in browser and hit submit I get the strange code below. It's supposed to redirect to a (currently non-existent) Thank You page on same hosting site. Is this just happening because it's now still just sitting on my hard drive and will work correctly once it's installed on a proper host with PHP on board?


$scriptpath = substr( $_SERVER['SCRIPT_FILENAME'], 0, -4 );
$paths = explode ( DIRECTORY_SEPARATOR , $scriptpath );
$myName = end($paths);
require $scriptpath . '/fbapp/php/';

if( strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) {

include 'fbapp/php/formcontroller.cls.php';

$ctl = new FormController( $myPage );

} else {

if( ! isset( $_GET['confirmation'] ) ) $myPage->ReportStats( 'NotifyFormView' );


vague new world....since 1949
User 187934 Photo

Senior Advisor
19,931 posts

You can't test the submit button on your local pc. Because of the PHP it needs to be tested on the server after upload.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
This is a site I built for use in my job.(HTML Editor)
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
User 34904 Photo

Registered User
41 posts

Great. Kind of as I expected but it's good to get corroboration. Thanks for the quick response.
vague new world....since 1949
User 464893 Photo

1,611 posts

You could install Wamp (Free) that gives you a server on your computer and a mysql database option. I use it to test my php with. Without that Eric is right it needs a server to run.

Only thing it uses Local host and the addresses will have to suit the folders on your computer where you have your website ie C:\wamp\www\yoursite\ (backslashes have to change to forward slashes when uploaded I have found).

I have not set it up or tried it but apparently you can also send emails and go live and host your own site.
Have your computer on 24/7 ???
My 2 cents
The Guy from OZ

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.