I have a page with a form to input a stock reference number, which will be passed to another page to generate an invoice, the invoice page works fine but i can only send one stock reference number at a time giving me only one entry per invoice.
Is it possible to post the stock reference number from the form to an array on the same page as the form, in order to build an array of stock refence numbers to pass to the invoice page, i have tried but every time I hit the submit button it clears the array
any help would be great
retaining variables when refreshing pages?
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: retaining variables when refreshing pages?
Read up on cookies or sessionsfilfish wrote:I have a page with a form to input a stock reference number, which will be passed to another page to generate an invoice, the invoice page works fine but i can only send one stock reference number at a time giving me only one entry per invoice.
Is it possible to post the stock reference number from the form to an array on the same page as the form, in order to build an array of stock refence numbers to pass to the invoice page, i have tried but every time I hit the submit button it clears the array
any help would be great
I was trying to avoid cookies, my host isn't supporting them, or if it does it doesn't like ones i've used n the past even though they worked on my home server.
I'm now able to pass a string such as
+oldcode1+oldcode2+newcode
and keep adding to it as i go, sort of putting all the stock references into 1 variable seperated by a '+', how would be the easiest way of estracting 'oldcode1', 'oldcode2' etc to load into individual variables in my invoice page?
I'm now able to pass a string such as
+oldcode1+oldcode2+newcode
and keep adding to it as i go, sort of putting all the stock references into 1 variable seperated by a '+', how would be the easiest way of estracting 'oldcode1', 'oldcode2' etc to load into individual variables in my invoice page?
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Yes... thats because you had error_reporting turned off on your home server and now suddenly the error_reporting is on on the production serverfilfish wrote:didn't make sense to me either, they worked perfectly well on my home server, uploaded the entire directory structure then I kept getting errors saying something like 'Fatal error - Session already started by index.html', and not displaying any page
If you add:
Code: Select all
error_reporting(E_ALL);Search this forum for "Headers already sent" with all terms selected and you'll see why.