472,119 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

PHP Mysql Creating a Subform

Hi,
I need help developing an expanding form
I've decided that a use of PHP, Mysql and Javascript is the best platform
for creating a selection of database interfaces which I'm trying to build
for my company. I had been using Microsoft Access, but obviously this
requires licenses for every machine. BUT.....
I'm look for an easy way of recreating subforms. I'm trying to create a
Purchase Order system and in Access I did this by using a subform (listing
the items on order) on a form (detailing the order information). In this
environment whenever you added a new item into the items section a new set
of dialog boxes woud appear for you to put another item in should you
require it, i.e. you could enter infinite items!
Whilst I've seen scripts that make forms dynamic they seem to wipe the
information already entered onto the form in order to update how many dialog
boxes are displayed.

Any ideas on this one would be greatly appreciated, any similar systems out
there?

Many Thanks
Matthew
Jul 17 '05 #1
1 9650
You will probably find that writing a PHP / MySQL application is very
different process than working in access. What you need to bear in mind
is that the client with a web application does not maintain a persistent
connection to the server. Doing the sort of thing (i think) you are
describing is in fact quite impossible. You will not be able to save
state between page loads with fields that are not submitted to the
server side scripting.

I can't solve your design issue in a short message, especially not
without seeing what you are doing, but in general, here's some tips to
designing a web application.

1. Think about your data dependencies. Figure out what data needs to be
entered before other data can be entered.

2. Build multiple forms across different pages to enter data. Usually
this means one form to one database table. Not always, but usually.

3. Develop your interface so that users enter data in an order that is
consistent with data dependencies. If an order, for instance, needs a
company record, have the application display the form to enter the
company record first.

4. Think out of the box. Web applications are weird critters and do not
always lend themselves to the most intuitive ways of doing things. The
technology is in fact limited.

You may do better trying to write a more conventional client/server
application. A Java, Visual Basic, or even PHP GTK-based client might be
a more approprate way to interface with your MySQL server to what you
want to do. Since you're doing this yourself, you may want to stick with
what you already know. There are also ways to use Flash to build
portable browser-based clients that interface with PHP scripts. Don't
get me wrong. I make my living building browser-based PHP web apps, but
not everything can be solved with a web app.

Best of luck!
Matthew Clubb wrote:
Hi,
I need help developing an expanding form
I've decided that a use of PHP, Mysql and Javascript is the best platform
for creating a selection of database interfaces which I'm trying to build
for my company. I had been using Microsoft Access, but obviously this
requires licenses for every machine. BUT.....
I'm look for an easy way of recreating subforms. I'm trying to create a
Purchase Order system and in Access I did this by using a subform (listing
the items on order) on a form (detailing the order information). In this
environment whenever you added a new item into the items section a new set
of dialog boxes woud appear for you to put another item in should you
require it, i.e. you could enter infinite items!
Whilst I've seen scripts that make forms dynamic they seem to wipe the
information already entered onto the form in order to update how many dialog
boxes are displayed.

Any ideas on this one would be greatly appreciated, any similar systems out
there?

Many Thanks
Matthew

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Russ | last post: by
1 post views Thread by Paul K. McKneely | last post: by
2 posts views Thread by Matthew Clubb | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.