Re: session/form no longer work after upgrade
| From: | Petre Agenbag | Date: | Thu, 08 Aug 2002 12:06:16 +0000 |
| Subject: | Re: session/form no longer work after upgrade | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111633@lists.php.net to get a copy of this message | ||
Nope, 4.1.2, stock RH 7.3 install
What ticks me off is that this whole app worked like a bomb on my 7.2
system (on which I did an upgrade to 7.3 ), but then decided to do a
clean re-install of 7.3...
I feel like a newbie, ;P
On Thu, 2002-08-08 at 13:59, Justin French wrote:
> on 08/08/02 9:50 PM, Petre Agenbag (internet@vsa.co.za) wrote:
>
> > HI Justin
> >
> > Well, the second form is simply to read some more info in that I enter
> > into a db.
> > All I have on that page is a text field reading the input, and a
> > text_area.
> > On the action_page I write to the db, using the username and password
> > from the session to authenticate the user.
> >
> > Even if I do a straight
> >
> > echo $_POST["from_field_name"];
> >
> > it comes up empty!
> > The same with
> > echo $_SESSION["username"];
> >
> > I just cannot understand this!
> > I have session_start() at the top of this page, but even without it, it
> > is surely at least supposed to send over the form variable???
> > It cannot be a php.ini setting, as the first form send over the username
> > and password in the same fashion without problems...
> >
> > Help???
>
> What version of PHP are u running? My guess is it's < 4.1.1
>
> do a phpinfo() to find out.
>
>
> Justin French
>
>
> > On Thu, 2002-08-08 at 11:23, Justin French wrote:
> >> on 08/08/02 6:05 PM, Petre Agenbag (internet@vsa.co.za) wrote:
> >>
> >>> action_page
> >>> session_start();
> >>> session_register("username","password");
> >>> check $_POST["username_form"] and $_POST["password_form']
> >>> if they have content,
> >>> $username = $_POST["username_form"] and $password =
> >>> $_POST["password_form"];
> >>> <a href="another_page">here</a>
> >>
> >> you have to establish what $username and $password are before you register
> >> them to the session:
> >>
> >> action_page
> >> session_start();
> >> check $_POST["username_form"] and $_POST["password_form']
> >> if they have content,
> >> $username = $_POST["username_form"] and $password =
> >> $_POST["password_form"];
> >> session_register("username","password");
> >> <a href="another_page">here</a>
> >>
> >> Incidently, I'd be using:
> >>
> >> action_page
> >> session_start();
> >> check $_POST["username_form"] and $_POST["password_form']
> >> if they have content,
> >> $_SESSION['username'] = $_POST["username_form"]
> >> $_SESSION['password'] = $_POST["password_form"]
> >> <a href="another_page">here</a>
> >>
> >> ... rather than session_register().
> >>
> >>
> >> From here, "another_page" should try to echo $_SESSION['username']
> >> &
> >> $_SESSION['password'] to make sure you're able to maintain session.
> >>
> >>
> >>> another_page
> >>> session_start();
> >>> <form>
> >>> variable -> another_action_page
> >>> </form>
> >>>
> >>> another_action_page
> >>> session_start();
> >>> echo $_POST["variable"];
> >>
> >> this has nothing to do with your session... you don't seem to be calling any
> >> session variables ($_SESSION[...]), or registering any new ones.
> >>
> >> I don't understand why you have this second form, and what it has to do with
> >> your sessions.
> >>
> >>
> >> Take small steps. Try to isolate the problem by getting rid of any noise
> >> from the script (eg the second form, heaps of HTML formatting, etc. Try and
> >> get the basic session working, then bring the noise back in, testing as you
> >> go.
> >>
> >>
> >> Justin French
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >
>