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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Login on template

Thread began 9/15/2010 1:23 pm by Cologne | Last modified 9/21/2010 2:09 pm by Jason Byrnes | 1837 views | 11 replies |

Cologne

Login on template

Hello,

is it possible to put the loginfield inside a template, so it is shown on every page?

An other thing:

I created a login form...and it will be vaidated by VT. now when the login fails, I dont wat to redirect. I just want to show the VT error message that saiy. "email and/or password wrong!"

is there a flag or something?

Cheers
Denis

Sign in to reply to this post

Jason ByrnesWebAssist

yes, place the login form on the template and set it to post to the login page.

validation toolkit cannot be used to validate the info in the form against what is in the database.

Use the failed login redirect for this.

Set the login failure to redirect back to the login page using a querystring:
login?login=failed

then add ann if statement to show the message:

php:
<?php if(isset($_GET['login']) && $_GET['login'] == "falied") { ?>

email and/or password wrong!
<?php ?>
Sign in to reply to this post

Cologne

Hi Jason,

that with login=failed works well, but if the user tries to login angain, the login=failed stays in the URL adress.

How can I make, that it starts always new?

Do I need to delete the $login somewhere?

As you can see I need the redirect only in VT.

<?php 
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "https://www.ssl-id.de/ichbinmusiker.de/login.php";
$_SESSION['WAVT_login_737_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRX(((isset($_POST["yourName"]))?$_POST["yourName"]:"") . "","/^$/i",false,1);
$WAFV_Errors .= WAValidateRX(((isset($_POST["yourEmail"]))?$_POST["yourEmail"]:"") . "","/^$/i",false,2);
$WAFV_Errors .= WAValidateEM(((isset($_POST["username"]))?$_POST["username"]:"") . "",true,3);
$WAFV_Errors .= WAValidateEL(((isset($_POST["password"]))?$_POST["password"]:"") . "",6,15,true,4);
$WAFV_Errors .= WAValidateAN(((isset($_POST["password"]))?$_POST["password"]:"") . "",true,true,true,false,"!@#$%^*()-_.:,;üäöÜÄÖß",true,5);
$WAFV_Errors .= WAValidateLE((strtolower(isset($_POST["code"])?$_POST["code"]:"")) . "",((isset($_SESSION["captcha_code"]))?strtolower($_SESSION["captcha_code"]):"") . "",true,6);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"login_737");
}
}
?>
<?php
if(isset($_POST["buttonLogin"])){
$WA_Auth_Parameter = array(
"connection" => $IchBinMusiker,
"database" => $database_IchBinMusiker,
"tableName" => "member",
"columns" => explode($WA_Auth_Separator,"email".$WA_Auth_Separator."password".$WA_Auth_Separator."confirmed"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"") ."".$WA_Auth_Separator."".WA_SHA1Encryption(((isset($_POST["password"]))?$_POST["password"]:"")) ."".$WA_Auth_Separator."1"),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text".$WA_Auth_Separator."int"),
"sessionColumns" => explode($WA_Auth_Separator,"memberid".$WA_Auth_Separator."profileid".$WA_Auth_Separator."access"),
"sessionNames" => explode($WA_Auth_Separator,"memberid".$WA_Auth_Separator."profileid".$WA_Auth_Separator."access"),
"successRedirect" => "Member/index.php",
"failRedirect" => "login.php?login=failed",
"gotoPreviousURL" => FALSE,
"keepQueryString" => FALSE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
Sign in to reply to this post

Jason ByrnesWebAssist

what is the action of the form?

Sign in to reply to this post

Cologne

the action is empty, I leave it always empty, when I use your extensions? should I use an action anyway?

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the login page and a page that has the login form added to it in a zip archive.

Sign in to reply to this post

Cologne

here it comes..

login.php got the login form. Old style with redirect if wrong.

/Member/index.php ist the redirect if its OK.

Denis

Attached Files
Member.zip
Sign in to reply to this post

Jason ByrnesWebAssist

these pages do not match your description of the issue.

in the login page you have sent the redirect is users_LogIn.php?failed=1 not users_LogIn.php?failed=true.

the only way that what you are describing would happen, is if the login form where set to pass any existing querystring variables.

In the login page you sent the action is set to $_SERVER["PHP_SELF"]

<form action="<?php echo ($_SERVER["PHP_SELF"]);?>" method="post" id="WAATKLogInForm">


which wont pass the querystring variables.

Sign in to reply to this post

Cologne

Hi Jason,

this is not the login page I want to have, this is just the normal login page I created when I use the wizard.

What does that mean?

<form action="<?php echo ($_SERVER["PHP_SELF"]);?>" method="post" id="WAATKLogInForm">



- WAATKLogInForm?

can I use your ACTION for all my forms that I leave blank to submit the current page?

Denis

Sign in to reply to this post

Jason ByrnesWebAssist

is just the id of the form.

If you are putting a login form on each page of your site, the forms action needs to be set to post to the login page:
<form action="login.php" method="post" id="WAATKLogInForm">


only on the login page can you set the action to post to itself.

Sign in to reply to this post
loading

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