Author: jfrederic.clere(a)jboss.com
Date: 2008-06-23 05:59:11 -0400 (Mon, 23 Jun 2008)
New Revision: 73
Added:
trunk/php/examples/post.php
Log:
Add a POST example.
Added: trunk/php/examples/post.php
===================================================================
--- trunk/php/examples/post.php (rev 0)
+++ trunk/php/examples/post.php 2008-06-23 09:59:11 UTC (rev 73)
@@ -0,0 +1,49 @@
+<?php
+//
+// Copyright(c) 2008 Red Hat Middleware, LLC,
+// and individual contributors as indicated by the @authors tag.
+// See the copyright.txt in the distribution for a
+// full listing of individual contributors.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library in the file COPYING.LIB;
+// if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+//
+// @author Jean-Frederic Clere
+// @version $Revision$
+
+// Test for POST
+?>
+
+<html>
+<head>
+<title>PHP POST test page</title>
+</head>
+<body bgcolor=white>
+
+<h1>Sample Application PHP</h1>
+
+<?php
+ print "Posted name: " . $_POST["name"] . "<br />";
+ print "Posted age: " . $_POST["age"] . " years old! <br
/>";
+?>
+
+<h1> Try again</h1>
+<form action="post.php" method="post">
+Enter your name: <input type="text" name="name" />
+Enter your age: <input type="text" name="age" />
+<input type="submit" />
+</form>
+</body>
+</html>
Show replies by date