close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Membership registration with existing membership database

Thread began 4/06/2011 12:04 pm by Dennis | Last modified 5/12/2011 4:36 pm by Dennis | 2043 views | 11 replies

info271221

Redirect to previous page on succesful log on

I cannot my log in page to redirect to previous page. I modified the action on line 137 per your post.

<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<?php require_once('../Connections/homesteadproducts.php');?>
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if ((((isset($_POST["autologinoption"]))?$_POST["autologinoption"]:"") != "")) {
setcookie("AutoLoginPWD", "".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if ((((isset($_POST["autologinoption"]))?$_POST["autologinoption"]:"") != "")) {
setcookie("AutoLoginUN", "".((isset($_POST["username"]))?$_POST["username"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if ((((isset($_POST["remembermeoption"]))?$_POST["remembermeoption"]:"") != "")) {
setcookie("RememberMePWD", "".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if ((((isset($_POST["remembermeoption"]))?$_POST["remembermeoption"]:"") != "")) {
setcookie("RememberMeUN", "".((isset($_POST["username"]))?$_POST["username"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if (isset($_POST["LogIn_x"]) && !isset($_POST["remembermeoption"])) {
setcookie("RememberMePWD", "", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if (isset($_POST["LogIn_x"]) && !isset($_POST["remembermeoption"])) {
setcookie("RememberMeUN", "", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_Auth_Parameter = array(
"connection" => $homesteadproducts,
"database" => $database_homesteadproducts,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"UserPassword".$WA_Auth_Separator."UserLogIn"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") ."".$WA_Auth_Separator."".((isset($_POST["username"]))?$_POST["username"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserAccess".$WA_Auth_Separator."UserID"),
"sessionNames" => explode($WA_Auth_Separator,"UserAccess".$WA_Auth_Separator."UserID"),
"successRedirect" => "../All_Natural_Pork_Products.php",
"failRedirect" => "users_email_pw.php",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
<?php
if((((isset($_SESSION["UserID"]) && $_SESSION["UserID"] != "")?"LoggedIn":"") == "")&&(((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") != "")&&(((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") != "")){
$WA_Auth_Parameter = array(
"connection" => $homesteadproducts,
"database" => $database_homesteadproducts,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") ."".$WA_Auth_Separator."".((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"int".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserAccess"),
"sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserAccess"),
"successRedirect" => "users_profile.php",
"failRedirect" => "",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><!-- InstanceBegin template="/Templates/homesteadtemplateMay11_2011.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxNavigationMenu.js"></script>
<title>Wholesaler Log In To Purchase With Discount</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../style.css" rel="stylesheet" type="text/css" />
<link href="../_css/styleTextEditor.css" rel="stylesheet" type="text/css" />
<link href="../layout.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../Styles/dmxNavigationMenu/basic_tabs/basic_tabs.css" />
<link rel="stylesheet" type="text/css" href="../Styles/dmxNavigationMenu.css" />
<!-- InstanceBeginEditable name="head" -->
<!--[if lt IE 7]><script type="text/javascript" src="Styles/IE7.js"></script><![endif]-->
<link href="../WA_SecurityAssist/styles/Traditional_Granite Pine.css" rel="stylesheet" type="text/css" />
<link href="../WA_SecurityAssist/styles/Geneva.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21892251-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
</head>
<body>
<div class="body-bg">
<div class="top-tail">
<div class="bot-tail">
<div id="main">
<!--header -->
<div style="position:relative; width:986px; margin-left:auto; margin-right:auto;"><div id="apDiv1"><a href="https://www.homesteadnaturalmeats.com/AllNaturalPork.php?id=137"><img src="https://www.homesteadnaturalmeats.com/images/Home-Page-House75_text.png" alt="" width="90" height="95" /></a></div>
<div id="apDiv2"><a href="https://www.homesteadnaturalmeats.com/AllNaturalPork.php?id=19"><img src="https://www.homesteadnaturalmeats.com/images/Home-Page-Hat75_text.png" alt="" width="90" height="95" /></a></div><table width="985" border="0" cellpadding="0" style="margin-left:auto; margin-right:auto;">
<tr>
<td><img src="https://www.homesteadnaturalmeats.com/images/americanhomestead_logo.jpg" alt="" width="981" height="254" /></td>
</tr>
<tr>
<td><?php require_once('../_navTop.php'); ?></td>
</tr>
<tr>
<td><div class="container line">
<div class="title"><!-- InstanceBeginEditable name="EditPageTitleOnPage" -->
<h1 class="TopTitle">Log In to purchase with wholesale discount</h1>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="EditBody" -->
<strong>If you are not registered please <a href="users_registration.php">register now</a>.</strong>
<div id="LogInContainer" class="WAATK">
<form action="<?php echo (htmlentities($_SERVER["PHP_SELF"]));?><?php echo(isset($_SERVER['QUERY_STRING'])?"?".str_replace("<","%3C",str_replace(">","%3E",str_replace('"',"%22", $_SERVER['QUERY_STRING']))):""); ?>" method="post" name="WAATKLogInForm" id="WAATKLogInForm">
<div class="WAATKButtonRow">
<center>
<table border="0" cellpadding="0" cellspacing="0" class="WAATKDataTable">
<tr>
<td width="493"><strong><span class="WAATKTextField">User:
</span> </strong> <input type="text" class="WAATKTextField" name="username" value="<?php echo((isset($_COOKIE["RememberMeUN"]) && isset($_COOKIE["RememberMePWD"]))?$_COOKIE["RememberMeUN"]:"") ?>" /></td>
</tr>
<tr>
<td><strong><span class="WAATKTextField">Password:</span></strong><span class="WAATKTextField"></span><input type="password" class="WAATKTextField" name="userpassword" value="<?php echo((isset($_COOKIE["RememberMePWD"]))?$_COOKIE["RememberMePWD"]:"") ?>" /></td>
</tr>
<tr>
<td class="WAATKDataTableHeader"><center>
<strong>
<input type="checkbox" name="remembermeoption" <?php echo((isset($_COOKIE["RememberMeUN"]))?"checked":"") ?> value="1" />
Remember me</strong>
</center></td>
</tr>
<tr>
<td class="WAATKDataTableHeader"><center>
<strong>
<input type="checkbox" name="autologinoption" value="1" />
Auto log in</strong>
</center></td>
</tr>
<tr>
<td class="WAATKDataTableHeader"><center>
<input type="image" hspace="0" vspace="0" border="0" name="LogIn" id="LogIn" value="Log In" alt="Log In" src="../WA_SecurityAssist/images/Granite Pine/Traditional_login.gif" />
</center></td>
</tr>
</table>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...