Upload

Previous Topic  Next Topic

How does the form get to the web server? Once you have prepared the HTML file containing the form and the PHP file containing the script, you need to upload them to the web server. This is usually done through FTP though your web server or page design software may use a different method. I will discuss FTP upload in this section.

 

To upload the script, you need to have an FTP client, i.e. software that lets you connect to the server and upload the files. A good choice is using the FTP client that is integrated into Total Commander (http://www.totalcommander.com).

 

In addition, you need to know these things:

 

-The host name of the FTP server.
-The FTP access login and password.
-The path were your website pages are located.

 

If you are unsure about these things contact your hosting company and ask them about uploading HTML pages.

 

Basically, you need to connect to the FTP server, change the current path to were the HTML pages that your website consists of are located, change the transfer mode to “ascii” (text) and upload the files.

 

You can also choose to use the command line tool that comes with Microsoft Windows. Below I will show you how.

 

1.Open the command prompt.
2.Change the current folder to where the web form files are located on your hard drive. For instance, if the path to the folder is “C:\My Documents\My Form”, you need to do this:

 

C:\  [PRESS ENTER]

cd \My Documents\My Form  (Press “Enter”)

 

3.type ftp followed by the host name of the FTP server. For instance, if the address of the server is “ftp.mycompany.com”, here is what you need to do:

 

ftp ftp.mycompany.com (Press “Enter”)

 

4.After connecting to the server, the program will ask you to enter the login and password. Example:

 

Connected to ftp.mycompany.com

220 Welcome! Server ready.

User (mycompany.com:(none)):  (Enter the login, and press “Enter”)

331 Password required.

Password:  (Enter the password, and press “Enter”)

 

The actual interaction may look a bit different depending on the FTP server but is going to look roughly like the example above.

 

5.After a successful login, change the current remote (FTP) directory to where you want to upload the files to. Usually, this is the same place where you keep the other pages your website consists of. For example, if the path is “/usr/www/users/mycompany” this is what you should do:

 

cd /usr/www/users/mycompany  (Press “Enter”)

 

6.Change the transfer mode to “ascii”:

 

type ascii  (Press “Enter”)

 

       or:

 

ascii  (Press “Enter”)

 

7.Upload the files. I assume that the file containing the HTML code for the form is called “form.htm” and the file containing the PHP script – “submit.php”. This is what you need to do:

 

put form.htm  (Press “Enter”)

 

Wait till the file is transferred and do this:

 

put submit.php  (Press “Enter”)

 

This is it!

 

You should now be able to open the form using the browser. If you uploaded the files to your website root directory and your website address is “www.mycompany.com”, you should be able to use this Internet address in your web browser to load the form:

 

http://www.mycompany.com/form.htm



   Continue reading...