![]() |
|
#1
|
|||
|
|||
Header and Session errorsSo I looked for a similar post on the forums and I couldn't find anything (don't really know what to type to find an answer). Here's the issue: I'm working on a user creation script to hook up with a MySQL DB. I've 3 pages in questions. They are show_adduser.php, do_adduser.php, and pageerror.php. Everything works fine but the lines of script I'm using to test if the inputed username already exists.
For some reason I have an issue between an echo and an if statement with a header redirect a few lines below (the echo shows how many similar results are in the DB.) I would like to still be able to see this on the do_adduser.php page, but it's not absolutely necessary. If I comment out the echo line, the do_adduser.php page redirects to show_adduser.php properly, but then for some reason DROPS $_SESSION[texliuser] and $_SESSION[texlipass] which allow the admin to access that page. SO, because these SESSIONS are dropped, it redirects to the pageerror.php page as it should. I have other SESSIONS that are being passed from do_adduser and do_showuser that show up just fine on the error page. SO, I have two questions: 1) why is the echo producing this result: Code:
2) Why are my SESSIONS being dropped when I have session_start() at the very beginning of each page? Here is my code on all of these pages. I have replaced certain areas with [value] do_adduser.php: PHP Code:
show_adduser.php: PHP Code:
pageerror.php: PHP Code:
I appreciate all help in advance! Thanks, Crazygol4 |
|||
|
#2
|
||||
|
||||
Re: Header and Session errorsSee if the link within this post might be helpful.
The "headers already sent" can be caused by a few problems. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Header and Session errorsSweet that makes a lot of sense of the first part...but why do you think it is dropping those particular $_SESSIONs and not the other ones?
|
|
#4
|
||||
|
||||
Re: Header and Session errorsI found this at php.net within the postings under session_start():
Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#5
|
|||
|
|||
Re: Header and Session errorsAhh perfect! That was the fix. Thanks a ton for the help!
![]() -crazygol4 |
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Session Problem | eRIC | MySQL / PHP Forum | 1 | 22-May-2004 23:40 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The