Im using the sever behaviors built into dreamweavers for the login function. The directory folder location is actually dragteck.com/prismV2. But I have it set up as a subdirectory on yahoo.
Main Topics
Browse All TopicsI have created an login field were it is suppose to redirect users to either back to the home page or a registration page. The site is currently a subdomain on a yahoo site used for testing. The problem is that when it redirects after the initail login it always point to the folder on the server instead of the actual subdomain address. For instance the main location is www.prism.dragteck.com, so when i login it should go to either the www.prism.dragteck.com address or www.prism.dragteck.com/ind
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I think this is the entire code but I don't see anything calling to that specific directory:
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])
$loginUsername=$_POST['use
$password=$_POST['password
$MM_fldUserAuthorization = "level";
$MM_redirectLoginSuccess = "index.php";
$MM_redirectLoginFailed = "registration.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_
$LoginRS__query=sprintf("S
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername)
$LoginRS = mysql_query($LoginRS__quer
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'l
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl'
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
ahh this is the line you need to look at:
header("Location: " . $MM_redirectLoginSuccess );
now what exactly is $MM_redirectLoginSuccess? This must be your problem.
edit: found the problem:
$MM_redirectLoginSuccess = "index.php";
change the above line to:
$MM_redirectLoginSuccess = "../index.php";
And your problem should be solved.
Let me know how you go.
Business Accounts
Answer for Membership
by: nizsmoPosted on 2007-10-10 at 17:41:08ID: 20053478
how are you redirecting after a successful login? com/prismV 2/):
Something like this would have worked (provided you are in directory http://www.prism.dragteck.
header("Location: ../index.php");
Let me know how you get on.