[prev in list] [next in list] [prev in thread] [next in thread]
List: php-general
Subject: [PHP] HTML Form Management
From: "Hummel, Timo" <timo.hummel () sap ! com>
Date: 2000-08-17 14:50:31
[Download RAW message or body]
Hi!
I've been working with PHP for over a year now and I've had the task to
build several form to do update/insert/delete tasks on a database. Altough
the tasks are quite the same, the process to create the forms are always
very different. A more specific example:
We've got a news database. The end user is provided a HTML form to update,
edit and delete news entries in different languages. The thing I've to do is
to create a PHP-Script to display the form, doing actions (like update,
insert, delete). A generic framework would look like this:
<HTML>
<header stuff>
blahblah...
<?php
// Process any actions taken on the form
if ($action=='delete')
{
// Process delete commands on the database
}
if ($action=='update')
{
// Add or update to the database
}
// Print out the form and/or display the update/delete/whatever request form
?>
</HTML>
Now I've been looking for a class or method to simplify form processing.
Things that should be included are:
Parameter passing.
It is important that the class or method fits in other environments. For
example, I'm using a php3 script
to dynamically load subdocuments (virtual frames). An example (currently in
german only) can be found
at http://www.elektro-kartell.de. In this example, I have the three
parameters main, menu and location.
These parameters need ALWAYS be passed over, since they control the content
to be shown.
Easier data output.
The constructs "while (x = mysql_fetch_array);" and associated commands to
print out the resulting form
should be simplified somehow. Maybe defining an external HTML template could
help here.
Action handling.
Updating/Inserting/Deleting records should be automatically handled by the
class or method.
If there's no class for this yet, I'd be ready to manage a team who tries to
build such a class.
Thanks
Timo
Timo Hummel SAP IT Enduser Services
Phone: +49 (0)6227 764204 EVZ, CU.22
Fax: +49 (0)6227 774204 Neurottstr. 16
E-Mail: timo.hummel@sap.com 69190 Walldorf / Baden
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic