On this page you will learn to get a database on the net and to use it from your Google Page Creator pages.

First of all, as you can know, Google Page Creator (GPC) doesn't provide any database neither any server utility. How to use a database in GPC if they are not provided by Google ? Easily... in coupling GPC with another server ! GPC is useful for writing a website without any knowledge in HTML or any kind of programming language but if you want, you can make GPC more interactive! Because you have the possibility to add Google gadgets to your own website and to make it, you can do whatever you want ! In this tutorial, we will learn to couple your GPC site to your database.

1- Find a database.

If you have already your own database, you can jump directly to the 2- Create a simple form... If don't, read this paragraph! So, you want to add a database to GPC but you don't have any idea of where to find one? Not a problem at all, internet has a lot of sites which will be happy to provide you these services free! For this tutorial, by example, I have open in 3 minutes (not a joke) a new account in a provider, activate my domain, my database and my FTP ! Yes in 3 minutes ! So why don't you test it too!

First thing to do : go to the main Google page and search 'MySQL PHP free'. MySQL is a very known kind of database, PHP because you will need to use this language in order to speak to your database and free because you don't want to pay... Personally, I have click on the first link (yes, I don't like thinking too much!). The following will describe how to get your own database on a particular site but any site may ask the same things.

After, I choose the site which had the better rate (idem). At this moment, the site was : AwardSpace.

fwsh.com : AwardSpace... click on this link for viewing the next picture.

Same thing, click on the Signup page link.

Now, you should be arrived on the page where you can fill differents fields for signing up in this site. Just answer to the questions and choose the free hosting plan and free subdomain (except if you have your own domain but it is not my case!). When you have finish, you should receive a mail in which you will have your own login, password and all the things you will need later! So don't trash it !

Go back to AwardSpace (or the one you have choosen) and log you in. Now, you will have to activate your subdomain. Click on Website Manager as shown :

Then click on the Subdomain Manager.

And on this page, be sure that you have a subdomain enable. If it is not the case, add a subdomain! I remember that you don't have any subdomain by default... So you will have to add one manually. You should have after submitted your subdomain name see this kind of screen :

If this is the case, congratulation, you have your own FTP server and it miss just your database. So, go back (to the Website Manager) and click this time to the Database Manager link. Same thing, add a data base to this account.

Once you have added your database, you may want to check that this base is activated! Go back to the Website Manager and click on the link named phpMyAdmin.

You should arrive on a login page. Enter the name you have enter as user to your database and your password. If your database is activated, you should arrive on this page.

If this the case, congratulation one more time, you have your own database! If you don't, just wait several hours until your base is under activation.

2- Create a simple form into your Google Page Creator site.

In this party, you will learn to create the bridge between your GPC pages and the database that you just have created (or that you had before!). What do we want having at the end of this paragraph, this form is :

This form ask to the visitor if the content of the page is bad 0, excellent 10 or between the two. This field is required for the submission. The visitor can also add a comment if he want. What could we use to make this kind of form in a GPC page? A gadget of course! The gadget I use on this site is "made home" so do not hesitate to give me a feed back if it doesn't work and also if it work well!

Anyway, this gadget is called FormGen (for form generator) and can generate any kind of form on your page. If you have any question about this gadget, visit this page. In order to use this gadget, you will have to create a little php file. What is it? Just the link between your GOC pages and your new database! If you don't know how to make a php file, don't worry I give you one. But you will have to modify it for being usable for your own database. But we come back on it later.

In your data, create a table called FormGenTest (you will be able to delete it later) with 3 fields.

Fill the fields as describe below whitout any mistake. Take care of the auto_increment and index properties on the right of the screen for the id parameter.

When it is done, you will have to modify and upload this file : FormGenTest.php. The modification of this file is very easy. Just open it with a notepad tool, don't modify anything except these lines :

$host = "The host name. Given by your provider.";
$user = "Your user name. Given by your provider too!";
$password = "Your password. do I repeat? :)";
$db = "The name of the database";
$table = "The name of the table that you want use (just for addUser.php)";

The host name can be obtain on the home page of phpMyAdmin (the first rectangle on the picture below).

The user name is the content of the second red rectangle on the previous picture. The password is the password you should have used to obtain your connection with phpMyAdmin. The name of the database is commonly the same that the user name. If you are not sure, it is the name at the top of the tree on left side of the home page of phpMyAdmin. The parameter table must be FormGenTest if you have follow this tutorial!

When your php file have been modified, you may now want to upload it to your site. On AwardSpace, you can do it from the Website Manager > File Manager. If you use another kind of site, the most used programm for FTP is Filezilla. You can download it here.

When your upload is done, search the address of your php file. By example, if you have upload your file on AwardSpace home/www/yoursubdomain.awardspace.com/FormGenTest.php, so your file must be at the address : http://yoursubdomain.awardspace.com/FormGenTest.php. Note that you will need this address for parametring your FormGen gadget.

Now, we will insert easily and quickly the gadget. If you don't know how to add a gadget in Google Page Creator, read How to add a Gadget into GPC ? before. The link XML to the gadget is here :


When you are on the page with the parameters of the gadget FormGen, fill the fields as describe. Action must contain the exact url of your php file. This is the address I spoke about several lines before. For the other fields, just copy...

Question : Note :|Comment :

Required : true|false

Types : text|text

If you want to test it by syndication, just click here and fill the Action field as describe.

The other fields are useful for the appearance of your gadget. You can test it later for having a more beautiful gadget on your own site! Click now on the OK button and... Congratulation (if it works...)! Your form is on your page!

Dispose it as you want, publish the page and view this page in live. For the test, type a note, a comment if you want and submit the form. The response should appear when the request is sent and should be the response of your php file. If it is not the case, check the url that you have given to the Action field.