Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Handling Forms

If we want users to be able to post their own greetings, we need a way to process information submitted by the user with a web form. PHP makes processing form data easy.

Handling Web Forms

Replace the contents of helloworld/helloworld.php with the following:

Reload the page to see the form, then try submitting a message.

When the form is submitted, the application receives a request using the HTTP POST method ( method="post" ) and PHP makes POSTed form variables available using the $_POST superglobal.

Let's take a closer look at how the form is processed:

Before displaying the message (stored in <textarea name="content" ), the application checks to see if is present in the $_POST superglobal. If it is then special HTML characters in the message (like "<") are replaced with their corresponding HTML entities (like &lt;) using the htmlspecialchars function.

Next...

Every web application returns dynamically generated HTML from the application code, via templates or some other mechanism. Most web applications also need to serve static content, such as images, CSS stylesheets, or JavaScript files. For efficiency, App Engine treats static files differently from application source and data files. You can use App Engine's static files feature to serve a CSS stylesheet for this application.

Using Static Files >>

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.