This is a discussion on "[SOLVED] PHP Session Variables in a form" within the PHP Forum section. This forum, and the thread "[SOLVED] PHP Session Variables in a form are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] PHP Session Variables in a form
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] PHP Session Variables in a form
Help, please, I'm going in circles with this.
I get the 'Warning: Cannot modify header information ' message at the top of the page, and onSubmit nothing happens. Any ideas? Thanks for any help!
Last edited by Rakuli; Oct 12th, 2007 at 10:05. Reason: Just popping in some [php][/php] tags to aid readability |
|
|
|
|||
|
Re: PHP Session Variables in a form
Thanks to anyone who read this.
I don't nee the help now as I have found a way around it. |
|
||||
|
Re: PHP Session Variables in a form
Just saw this, sorry. You need to put all the session info first, before you send anything to be displayed in the browser. AFAIK it needs to go even before the DOCTYPE declaration.
Last edited by masonbarge; May 7th, 2007 at 19:27. |
|
|||
|
Re: PHP Session Variables in a form
ob_start() needs to go before the DOCTYPE selector, but ob_end_flush() can go anywhere. Personally, I typically place it just before my opening <form> tag. (If you're going to display a form, you're truly ready to output content to the page, right?) This works well for me.
|
|
|||
|
Re: PHP Session Variables in a form
I've not been logged in for a while. Happily I finished my dissertation and passed with flying colours. Thansk for all your help on this I really appreciate it. I know that when I have my next web project, I shall be back to ask more questions.
|
![]() |
| Tags |
| form, header, php, session |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] php re-writing variables in config from form | Emzi | PHP Forum | 2 | Jan 22nd, 2008 07:58 |
| Session variables | ideleon | PHP Forum | 2 | Feb 7th, 2006 08:04 |
| Session Variables.... | courtjester | Classic ASP | 11 | Jul 6th, 2004 00:04 |
| Session Variables | ekendricks | Classic ASP | 4 | Dec 19th, 2003 06:33 |
| Session Variables | ekendricks | Classic ASP | 7 | Aug 26th, 2003 10:42 |