- Moderated by:
- Support
-
- rank:
-
Softmore
- registered:
- May 2003
- Status:
- offline
- last visit:
- 02.06.04
- Posts:
- 74
Where can I change the code to direct the user back to the index.php vs going to "My account" on login. This page will not be available to the users on my site, so I need them to be directed back to the home page after login.
Any suggestions?
Ruth in AZ -
- rank:
-
Professional
- registered:
- September 2003
- Status:
- offline
- last visit:
- 21.10.07
- Posts:
- 2423
..the login block has code that will return the user from where they came..
..otherwise you can use something like this within your login form:
Code
-IR
--
http://www.invalidresponse.com -
- rank:
-
Softmore
- registered:
- May 2003
- Status:
- offline
- last visit:
- 02.06.04
- Posts:
- 74
First of all thanks so much for you immediate reply.
This is the code from my login screen - I want to make sure I understand your correctly - I get the following error message
Parse error: parse error, unexpected T_ECHO in /home/singles/public_html/test/main/modules/NS-User/user.php on line 333
Are you stating replace:
the following code
"<input type="\"hidden\"" name="\"url\"" value="\""" />\n";
Replace with This?
echo "<input type="hidden" name="url" value="index.php" />";
The current code in its entirety:
function user_user_loginscreen()
{
include 'header.php';
OpenTable();
echo "<form action="\"user.php\"" method="\"post\"">\n" . "<font class="\"pn-title\"">" . _USERLOGIN . "
\n" . "
\n" . "<input type="\"hidden\"" name="\"url\"" value="\""" />\n"; \n" . "\n" . "<font class="\"pn-normal\"">" . _NICKNAME . ": <input type="\"text\"" name="\"uname\"" size="\"26\"" maxlength="\"25\"" /> \n";<font class="\"pn-normal\"">" . _PASSWORD . ": <input type="\"password\"" name="\"pass\"" size="\"21\"" maxlength="\"20\"" />
if (pnConfigGetVar('seclevel') != 'High') {
echo " \n";<font class="\"pn-normal\"">" . _REMEMBERME . ": <input type="\"checkbox\"" name="\"rememberme\"" />
}
echo "
user_submit('NS-User', 'login', _LOGIN);
echo "</form>\n";
CloseTable();
Thanks so much for your help.
Ruth in AZ -
- rank:
-
Professional
- registered:
- September 2003
- Status:
- offline
- last visit:
- 21.10.07
- Posts:
- 2423
..you got it Ruth.. :)
just change:
value=\"" . getenv("HTTP_REFERER") . "\"
to:
value=\"index.php\"
-IR
--
http://www.invalidresponse.com
