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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PHP coding errors on SA built password update page

Thread began 7/30/2010 11:53 am by jbarron397794 | Last modified 7/30/2010 12:09 pm by Jason Byrnes | 514 views | 1 replies |

jbarron397794Beta Tester

PHP coding errors on SA built password update page

Hi, the PHP code that was generated by the Security Assist wizard for the password update page seems to be incorrect:

1) The error code is placed before the <body> tag which probably explains why the codes are displaying up at the very top above my navigation. I imagine I can move the PHP code to within the <body> tags where I would like it to display?

2) This is the most annoying error. It is displaying multiple messages at once. In other words it displays "You entered an incorrect passwordCongratulations You have successfully changed your password" all in one run on sentence. This also displays automatically no matter what the user enters in.

3) The errors are displaying even if you don't hit the "submit" button. It is displaying even if you just refresh the page.

Here is that portion of the code:

<?php
include('Connections/rsmyconnect.php');?>

<?php
$username = $_POST['username'];
$password = $_POST['password'];
$newpassword = $_POST['newpassword'];
$confirmnewpassword = $_POST['confirmnewpassword'];

$result = mysql_query("SELECT password FROM users WHERE username='$username'");
if(!$result)
{
echo "The username you entered does not exist";
}
else
if($password!= mysql_result($result, 0))
{
echo "You entered an incorrect password";
}
if($newpassword=$confirmnewpassword)
$sql=mysql_query("UPDATE users SET password='$newpassword' where username='$username'");
if($sql)
{
echo "Congratulations You have successfully changed your password";
}
else
{
echo "The new password and confirm new password fields must be the same";
}
?>

Please help! Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

the Security Assist Wizard does not create an Update password page.

The pages created when you run the security assist wizard are:

Registration
Login
Profile
EmailPassword
Logout

See the "Introduction to SecurityAssist" tutorial in the solution recipe section of the security assist support page for instructions on creating a New Password page:
securityassist/

I have never seen security assist generate code that looks like what you have pasted.

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