passing variable to same page without post or get?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

passing variable to same page without post or get?

Post by Illusionist »

i must really be dumb to ask this question, but for the love of god i cannot figure this out!!

Im trying to check for errors, and if it finds errors it wil add them to a string then redirect you back tot he page you came from... And there i would display the errors at the top of the page... Only i can't figure out how to pass that error string to back to the page without post or get... any suggestions?!
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

sessions is the answer my dear friend...

check for the error, set a session variable, and return to the page you came from (with header)

in that page check for that session var and display it (inmediately after you display it unset that var).
Post Reply