close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

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 jbarron397794 | 543 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:


$username = $_POST['username'];
$password = $_POST['password'];
$newpassword = $_POST['newpassword'];
$confirmnewpassword = $_POST['confirmnewpassword'];

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

Please help! Thanks!

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





Ease of use


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