473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 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 23 '05 #1
2 3308
"Matthew Clubb" <ma**@mwclubb.co.uk> skrev i meddelandet
news:cp*******************@news.demon.co.uk...
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?


Dunno what a subform is. But you could have a <select> list wired to a bunch
of form controls. Add and remove things in the <select>, display the
values/options with the controls. This would all be a lot easier if the
options are the same for all items (quantity, colour and shipping, say), but
if you have different options for different type items, you could
dynamically insert/delete form elements as required (with DOM). Or stuff
sets of form controls into <span>s which you hide/show as appropriate. Or
maybe have an iframe system where a form is generated server-side. In any
case, you wouldn't have to display a popup window.

You would perhaps do well to think about a generalized system for generating
forms dynamically server-side based on, for instance, fields in a MySQL
query/database table. That way you don't keep custom-building stuff where
the requirements are really quite similar. A PHP system that auto-generates
HTML forms based on MySQL table structure isn't at all difficult to
implement.

Joakim Braun
Jul 23 '05 #2
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 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matthew Clubb | last post by:
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...
0
by: Brandon | last post by:
I was wondering if anyone here has experience using OpenOffice to create DataForms for MySQL Server Databases. If so, I'm having a problem creating a subform with two Parent Forms. I have...
7
by: ppywong | last post by:
Hi, hopefully people can help: I am creating a rather simple database for a kids holiday camp. I have two main tables: tblLData (Leaders info) and tblKData (kids info). What I have done is...
4
by: aflat362 | last post by:
If you look at this page on relational database design: http://r937.com/relational.html And scroll down to the "Many-to-Many Relationships" Section you will see a common database structure. ...
3
by: solargovind | last post by:
Hi, I am New to this forum. I need steps that i do in creating subform. In main form, i have one table fields like vendor,account,due amount,balance amount and Requisition_id which is...
4
by: rczuba | last post by:
Problem: Creating a Default Value for a field in a subform when a field in the subform & form match. I'm trying to create a payroll database for a small home business that I have that has had...
1
by: paulq182 | last post by:
PLEASE HELP ME WITH MY CODE?? import java.sql.*; import java.io.*; class min_filmdb_rel_mysql { public static void main (String args ) throws SQLException, IOException {
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
3
by: RAG2007 | last post by:
Hi, I'm creating a backend for my Access front end in MySQL, and am running tests. I am coming across the infamous "Write Error". Here's an instance: I open a form with a subform, and when I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.