1
fredski
Login Form Error
  • 2004/7/30 9:30

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


I have the following code on my pages for the login form.

<form action="<{$xoops_url}>/user.php" method="post">
                  <
div align="right"><span class="navtext">Name: </span
                    <
input type="text" name="uname" class="navinput" size="12" />
                    <
span class="navtext"Pass: </span 
                    <
input type="password" name="pass" class="navinput" size="12" />
                    <
input type="hidden" name="xoops_redirect" value="<{$xoops_url}>/index.php" />
                    <
input type="hidden" name="op" value="login" />
                    <
input type="submit" value="login" class="button" />
                    &
nbsp;&nbsp;
                    <
input type="checkbox" name="rememberme" value="On" class="formButton" />
                    &
nbsp;Remember Me? &nbsp;&nbsp;<a href="<{$xoops_url}>/user.php#lost">Lost 
                    Password
?</a> | <a href="<{$xoops_url}>/register.php">Register!</a>&nbsp;&nbsp
                  </
div>
                </
form>


But when I login the redirect goes to :-
http://www.ideal-handling.comhttp://w ... ling.com/portal/index.php

Rather than http://www.ideal-handling.com/portal/index.php which is what it is supposed to do. Answer is probably staring me in the face but as I'm doing so manny changes at the moment my head is mush.

2
Digiegirl
Re: Login Form Error
  • 2004/7/30 12:39

  • Digiegirl

  • Just popping in

  • Posts: 44

  • Since: 2002/8/23


Hi Fredski,

The error may be here:

<input type="hidden" name="xoops_redirect" value="<{$xoops_url}>/index.php" />

try:

<input type="hidden" name="xoops_redirect" value="/index.php" />

Hope it helps,

Dee

3
Dave_L
Re: Login Form Error
  • 2004/7/30 12:45

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Or you could try removing that hidden form field completely. I looked at how that field is processed in include/checklogin.php. The parsing is complicated and I'd have to spend more time to figure out exactly what it's doing. But if that form field is missing, then the default behavior is a redirect to XOOPS_URL.'/index.php', which appears to be what you want.

4
phppp
Re: Login Form Error
  • 2004/7/30 13:00

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Quote:

fredski wrote:
But when I login the redirect goes to :-
http://www.ideal-handling.comhttp://w ... ling.com/portal/index.php

Rather than http://www.ideal-handling.com/portal/index.php which is what it is supposed to do. Answer is probably staring me in the face but as I'm doing so manny changes at the moment my head is mush.


nothing else but XOOPS_URL."..."
it blocks your _POST variables

if your server safe mode on?

5
Catzwolf
Re: Login Form Error
  • 2004/7/30 13:10

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Does it redirect you with the other parts of this form? ie with the <{$xoops_url}>/user.php#lost and <{$xoops_url}>/register.php?

If so, there could be a problem as phpp says. I would drop the xoops_url and try that.

6
fredski
Re: Login Form Error
  • 2004/8/4 10:36

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


Ok I tried removing the $xoops_url so it would just be /index.php, problem with that is it redirects to the site root index and not my XOOPS root index i.e ideal-handling.com/index.php rather than ideal-handling.com/portal/index.php.

the other redirects such as the register and password work fine with the $xoops_url

I then took the line out for the hidden redirect and it works fine, thanks Dave_L and also everyone else for their replys

Login

Username:
Password:

Lost Password? Register now!

Who's Online

62 user(s) are online (35 user(s) are browsing Support Forums)


Members: 0


Guests: 62


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits