This is actually a reasonably common question, and is related to the
user interface you wish to present your users, HCI best practice,
suitability for purpose, and numerous other factors I haven't thought of
Basically, if you want processing to be done with the data - dynamic
probably the most portable method of doing things. This means that input
can be validated and the page modified as appropriate on the user's
desktop, without having to 'submit' anything to the server. The
copy of it; it's not as portable as it should be between browsers, and
it's another language to write stuff in - For a secure system, you'll
need to re-validate the input back on the server when the user does
submit, so it's likely you'll have to implement the same functionality
Provided the page contents are 'sized' for the connection between user
and server, then submitting between pages and generating the new page
based on user input shouldn't be a problem for the user, lag-wise. Of
course, you'll need to scale the webserver to handle this load,
dependant on number of concurrent users and the complexity of the input
validation and other processing. Static graphics will likely be cached
and so can be allowed - and the rest of the processing you allude to is
merely some numeric and string input - shouldn't be a problem I'm
guessing (but without a specification I can only guess, of course.)
What you list as your current format is certainly a well established
and acceptable practice - the 'wizard' format, if you will :-) It
provides a clear line of progression, allows the user to traverse
linearly ( because branches (if any) are handled by the server and are
conceptually insignificant to the user, if done correctly) the data
This means you can write everything in PHP and do all your input
validation and page generation on the server. Nothing wring with that at
Often, it's convenient to do simple validation of data (input must be a
string, input must be a number, input but be between certain values,
Plenty of examples of this type of code are available on the net.
http://www.echoecho.com/jsforms03.htm was the first google result
is often veyr helpful - speeds things up - and is quite acceptable.
Indeed, without it some of the larger websites would have difficulty
scaling to the concurrent user numbers they handle.
Hope this helps somewhat. :-)
Declan Grady wrote:
> Gareth Eason wrote:
>> Please do call back again. Apart from the trolling, irrelevant
>> replies, responding before reading what's been said previously in the
>> thread, arbitrary and unnecessary zealotry, religiously guarded
>> 'opinions' on operating systems, editors and languages, and numerous
>> other faults and failings that seem inherent in any mailing list,
>> we're mostly a nice and reasonably helpful bunch :-)
> I'm back..
> I've managed to do some basic (no pun intended) php which takes the
> input from a form and does some calculations and mysql lookups ... so
> far so good.
>> So far, I have one page with a form, all fixed data.
> The variables assigned by all these input boxes, checkboxes and radio
> buttons are then posted as variables to my php script which processes
> once I press the "submit" button. - ok, so far so good.
>> Now, after this processing I need to take more data from the user, and
> do more processing, then take more data and do some more processing ..
> etc etc ..
>> Am I going the right way .. I think I'm missing the point somewhat ..Is
> it (easily) possible to have the page dynamically change as I enter data
> and make selections, without having to "submit" each time.
>> Having said that, I do like the ease of functionality of using the back
> button and chnaging some data, and submitting again.
> i.e. My current format would be something like:
> 1. Enter data on page1 and press submit button
> 2. process this data, and display page 2 (containing summary of data
> entered so far and new choices)
> 3. Enter data on page2 and press submit
> 4. process this data and display page3 (containing summary of entries
> from pages1 & 2 and new choices which are dependent on data entered)
> 5. Enter data .... etc etc.
> .... finally end up with display of the resulting arrays, with options
> to save/print/modify ... etc.
>> I am building up a few arrays of the results of the processing and using
> variables from all pages so far submitted.
>> I guess Im away off on a tangent from where I should be going, but I've
> googled and googled (and googled) to get this far and I'm stuck.
>> Thanks for any suggestions.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!