close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

password user protected login page working perfectly localhost working remote server loading database recordset next page Please advice regards Dr R Dasgupta

Thread began 11/21/2016 12:19 pm by Ramaprasad | Last modified 11/21/2016 5:45 pm by Ray Borduin | 147 views | 1 replies |

Ramaprasad

password user protected login page working perfectly localhost working remote server loading database recordset next page Please advice regards Dr R Dasgupta

connection:
<?php
# FileName="WADYN_MYSQLI_CONN.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn_members = "localhost";
$database_conn_members = "cnmcuk_cnmc";
$username_conn_members = "users";
$password_conn_members = "daktarbabu";
@session_start();
$foundConnection = false;
if ($foundConnection == false) {
$domains = explode(",","daghraphics.co.uk");
for ($domindex = 0; $domindex<sizeof($domains) && !$foundConnection; $domindex++) {
$domainCheck = trim($domains[$domindex]);
if (strpos(strtolower($_SERVER["SERVER_NAME"]),strtolower($domainCheck)) !== false && ($domainCheck == "" || strpos(strtolower($_SERVER["SERVER_NAME"]),strtolower($domainCheck)) == strlen($_SERVER["SERVER_NAME"])-strlen($domainCheck))) {
$hostname_conn_members = "ftp.cnmcuk.com";
$database_conn_members = "cnmcuk_cnmc";
$username_conn_members = "cnmcuk";
$password_conn_members = "Dasgupta21!";
$foundConnection = true;
}
}
}

$conn_members = new mysqli($hostname_conn_members, $username_conn_members, $password_conn_members, $database_conn_members);

?>
login
<?php require_once('../Connections/conn_members.php'); ?>
<?php require_once('../webassist/mysqli/authentication.php'); ?>
<?php
if (isset($_POST["submit"]) || isset($_POST["submit_x"])) {
$Authenticate = new WA_MySQLi_Auth($conn_members);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "user";
$Authenticate->Table = "userpass";
$Authenticate->addFilter("user", "=", "s", "".((isset($_POST["user"]))?$_POST["user"]:"") ."");
$Authenticate->addFilter("password", "=", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "friend.php";
$FailedRedirect = "denied.php";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;
$Authenticate->execute();
}
?>
I am attaching the codes. I don't see any fault. But will not load the next (friend) page.

Sign in to reply to this post

Ray BorduinWebAssist

If it works locally and not on the live server then it isn't a problem with the code you provided. It may be a server configuration issue or just different values in the live database preventing login.

I'd need FTP access to debug completely and identify the problem.

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