473,320 Members | 1,867 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,320 software developers and data experts.

Structuring forms and scripts

Hi guys

I need some advice on how to best structure my forms and php code into
separate files, and how to move variables and form content between
them. I'm sure this is really standard stuff and it must have been
solved over and over already.

This is the flow of what's happening and how it's been structured so
far:

- Script1: Displays a varying number of products (from a previous
search) in a form, each with a check box. The user ticks the products
he wants to order, clicks continue and the form posts to Script2.

- Script2: Lists the products ticked in the form in script1, then
displays another form with input fields where user enters lots of
information. This script/form submits back to itself and performs
field validation until it's happy with all the input. When it is
(happy) the script goes off and does 'other stuff' (this is coded as
an include file) - and all works well.

Now I have decided to complicate things by showing another page just
displaying all information entered so far (in script1 and script2),
before going off to do 'other stuff' or go back to the form in Script2
to change the info. So I'd like to put all of this into Script3 and
call this from Script2, but this is where I run into problems. I
tried (in Script2) a header("Location: script3.php") - but that caused
header problems (although there are probably ways around this) - but
also this doesn't bring me across the form data?

I could code everything into Script2, but then that will be horribly
long and messy and difficult to read, so I'd rather not. This feels
like it must be standard stuff - any suggestions for a php-newbie on
how to solve?

thanks in advance

Milla
Jul 17 '05 #1
0 1297

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

Similar topics

1
by: jmgro | last post by:
I need help in structuring a 200 question survey. Each question has three responses, and I want all 200 questions displayed at the same time with the user using the scrollbar to go down. What is...
1
by: Gary Shell | last post by:
I am trying to figure out the best way to subdivide a project for multiple programmers. I am embarking on a new development project with one other person but with an idea in mind that we may need...
3
by: arun.hallan | last post by:
Hi, I need some structuring help. I have a set of data, in the form of an arraylist of objects. Each object is the same, and can be treated as a generic object which gets and sets properties....
0
by: Vinay Nagrik | last post by:
Hello Group members, I have access to server side php script which takes parameters from a form and processes the buffer and saves the file. However, I, as an implementor, do not have the...
7
by: JohnGoogle | last post by:
Hi, I'm new to Visual C# and I am looking for guidance with structuring projects. I am wanting to develop a DLL assembly which will contain all my common classes which will be used by various...
2
by: Susanne West | last post by:
hi group. i'm tackling a bigger project that will use mod_rewrite to patch a series of urls into a master php-script. this script builds the page framework that contains a series of elements...
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
4
by: Tom de Neef | last post by:
I hope you don't mind trivial questions. I only ask them after failing to find answers in my book and on the web... Can I split Javascript code into separate js files which reference each other...
3
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= | last post by:
I have a web application that I started building. I created a master page with some javascript in the head: <script src="<%# Request.ApplicationPath%>/Scripts/Main.js"...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.