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

rating

I am using the mysqli login and even though I've set the success redirect to newrecord.php, it goes back to the last page I was logged into modifypage.php?eid=xx.

Thread began 1/28/2015 5:57 pm by dionysus224892 | Last modified 1/30/2015 2:41 pm by Jason Byrnes | 705 views | 5 replies |

dionysus224892

I am using the mysqli login and even though I've set the success redirect to newrecord.php, it goes back to the last page I was logged into modifypage.php?eid=xx.

I've added the details because I expressly want that page to load after login—I don't want any previous information saved in the session. How can I ensure the page I want loading?

Sign in to reply to this post

Jason ByrnesWebAssist

make note of the name you assigned the login, the you can add code to the login page at line 1 to unset the redirect session that is created.

for example if the login is named MyLogin:

<?php
@session_start();
if(isset($_SESSION['WA_FAIL_MyLogin'])) unset($_SESSION['WA_FAIL_MyLogin']);
?>
Sign in to reply to this post

dionysus224892

Hi there Jason and thanks for responding

I use the login name "user" and I inserted the code you sent as shown here :

<?php require_once('Connections/ehs.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
<?php
@session_start();
if(isset($_SESSION['user'])) unset($_SESSION['user']);

if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) {
$Authenticate = new WA_MySQLi_Auth($ehs);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "user";


But problem is still happening. And not only that, but it logs back with a doubled query string.

For example :

I'm at modifypage.php?id=55 and login expires or I logout.

When I log in again, instead of going to newpage.php, it goes to modifypage.php?id=55&id=55 which causes a SQL syntax error.

Not sure why when I"m using the extension and not messing around with it.


QUESTION : do I reference $_SESSION['user'} our #_SESSION['WA_FAIL_user']?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

if(isset($_SESSION['user'])) unset($_SESSION['user']);


should be:
if(isset($_SESSION['WA_FAIL_ user'])) unset($_SESSION['WA_FAIL_ user']);

Sign in to reply to this post

dionysus224892

Thanks you! It seems to work great now. I appreciate your help!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

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...