You are here: POST, GET and SESSION « PHP Programming Language « IT news, forums, messages
POST, GET and SESSION

Posted by Jerim on 07/25/07 18:20

Until today, I thought those were the only three ways through which
variables could be passed along and accessed by various pages.

I am working on some legacy code that has been through several hands
over the years. The gist of it is that there is a "Register" button on
our website, that goes to a redirect page, that then calls a page that
displays our registration form. The URL the Register button uses
includes passing a variable. For instance, lets say the URL is
http://www.website.com/register.php?code=01

The thing is that on register.php there is no POST, GET or SESSION
anywhere. The redirect page does include the variable in the URL, but
that is all. It doesn't do anything else with it. I moved this entire
site from our production server to a test server. I can't imagine what
was in place on the original server that would have caught the
variable from the URL, stored it and then served it up to any page
that requested it. The only reference in the comments regarding where
the variable comes from is on register.php:

//$order, $code are defined from someplace...

That is the entire comment, and it is never mentioned again. So
presumably the last person to work on it wasn't sure how it was
working either. I did try using the GET method on the register.php
page which works. However, the register page is meant to be dynamic.
Meaning that it contains code for three different pages. As a user
finishes a page, they click NEXT. The page then reloads, check various
IFs and populates the next screen. I have thought of using an IF
($_SERVER['REQUEST_METHOD'] to either GET or POST the variable. But I
would like to try and figure out how the current system works. Any
guesses? They will be greatly appreciated.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация