Prob.. in change pasword page

i have a prob...in following code in which user when wants to change his password..he has to enter the username and old password..and then new password..then below query update the password....
my prob is that the password is changing but prob is that if i enter the old password wrong in the field..then also it updates the new password....
i.e user when eneter the old password...then also it changes the password...
i have to do that the usersname and password should be match with old password..then the password update has been done...else it shown error..
plz..where is the prob..in the below code...let me know...
<%          
try
String Username = request.getParameter("msno");
String OldPassword = request.getParameter("pass");
String NewPassword = request.getParameter("npass");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:pf","scott","ttlscott");
con.setAutoCommit(false);
PreparedStatement pstatement = con.prepareStatement(
"UPDATE login_mast SET password = ?  WHERE name=?");
pstatement.setString(1, NewPassword);
pstatement.setString(2, Username);
int rowCount = pstatement.executeUpdate();
con.setAutoCommit(false);
con.setAutoCommit(true);
PreparedStatement sql = con.prepareStatement("SELECT * FROM login_mast WHERE name = '" + Username + "' and password='"+NewPassword+"' ");
ResultSet results = sql.executeQuery();
if(results.next())     {%>
<% response.sendRedirect("chng_pass.html");
}else{
      response.sendRedirect("error.html");
catch (SQLException s)
out.println(s.getMessage());  
%>

PreparedStatement pstatement = con.prepareStatement(
"UPDATE login_mast SET password = ? WHERE name=?");The problem is here... where have you verified that the old password is correct?
Change the query:
UPDATE login_mast SET password = ? WHERE name = ? AND password = ?Set the old password as the third parameter.

Similar Messages

  • How To Sync WITHOUT Changing App Pages On Device

    *Help please. I can connect and sync my iPod Touch without probs. I want to sync apps WITHOUT changing the pages, or location of icons on each page, as they appear on my device. How may I do this?? There are options to "sync by" size, date, etc, etc. None of those appear to allow me to keep the apps arranged as I have them when I launch iTunes. There must be a way! Thanks!!*

    *Not sure what you mean. I do not have my apps organized by folders. I do have my apps organized by my usage (most used on page 1, etc). I sync MANUALLY. Therefore, when I go to app tab for syncing, the apps are shown as they appear on my device, but are grayed-out. When I check the "sync apps" box (upper left) the apps rearrange themselves into a random order; change pages, etc. I immediately uncheck the box and do not sync. If I do sync the apps, the sync process rearranges the apps into the random order shown when I check the box. All I want to do is sync my apps WITHOUT messing with the order in which I have arranged them on my device. HELP!*

  • How do you can change the page size of a pdf in MAC?  I have multiple pdf documents of different sizes that I want to combine.

    Help.  How do I change the page size of a pdf in MAC?  I have multiple pdf documents in varying sizes I would like to combine and print.

    There's no real need to do that. A PDF can have pages of different sizes.
    On Fri, Jun 6, 2014 at 4:11 AM, christine rambo <[email protected]>

  • How Can I Change One Page to Look Different From The Rest of My Pages?

    Hi, my website uses a CSS page with a dark background and white type. But I have one page I need to have a white background and light grey type on. I am not sure how to do this without it changing all of my site's look which I don't want to do. I only want to change one page to have a different look. How can I do this? I am new to CSS so please try to explain how I can do this in simple terms if you can. Thanks.

    There are 3 ways to use CSS.
    External style sheet: a separate physical file that contains all your site wide rules & to which your html documents are linked.
    http://alt-web.com/DEMOS/DW-Link-Stylesheet.shtml
    Embedded styles: page specific rules in the <head> section of code view.
    <head>
         <style type="text/css">
              page specific styles go here...
         </style>
    </head>
    Inline styles: CSS styles in the markup (mostly used for HTML emails and not on web sites).
         <p style="color:red">This paragraph has a red style.</p>
    In order of importance, inline styles override embedded styles.  Embedded styles override external styles. 
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How can I change the page size of a pdf so i can view it on my iphone more clearly?

    How can I change the page size of a pdf so i can view it on my iphone more clearly?

    I think there may be more to this question than you say.
    If your PDF page is say, 8 x 12 inches, and you found a way to scale it to 25%, changing it to 2 x 3 inch, shrinking everything on the page to quarter size - wouldn't it look exactly the same on the iPhone? It's just going to be the same as zooming.
    Or were you hoping for something more like in Word, where changing the page size keeps everything the same size and spreads it over more pages? That isn't something you can do.

  • HT4942 After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • How do I change the page size of a pdf?

    I'm trying to send a manuscript to a printing service in another city. It was produced using Microsoft Publisher. In Acrobat Pro I changed the page size from the default (8 1/2" x 11") to the size of my finished document --- 7.8" x 10". Yet when I send the manuscript to the printer it's still the larger size. I've tried right-clicking on the pdf printer and changing to a close approximation (7.5" by 10"), which is listed as one of the available alternatives, but it won't let me change it. What am I doing wrong?

    There's no real need to do that. A PDF can have pages of different sizes.
    On Fri, Jun 6, 2014 at 4:11 AM, christine rambo <[email protected]>

  • How can I change a page position in a large document?,

    How can I change a page position in a large document?

    Question asked and answered many times !
    Insert a section break just before the page to move.
    Insert a section break just after the page to move.
    Select the page's thumbnail
    cut
    Insert a section break where you want to insert the page.
    paste
    The required infos are available in Pages User Guide which isn't delivered to help helpers to help you.
    Yvan KOENIG (VALLAURIS, France) mercredi 5 octobre 2011 14:33:24
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • After making a website with muse and launching it with Business Catalyst. My website gives a notice: To change this page, upload your website into the public_html directory. How can i upload my website into the public_html directory?

    Hello,
    I'm using a Mac and made a website with Muse. After making the website i published the site and launched this afterwards with Business Catalyst.
    When i enter my website, i got the notification: To change this page, upload your website into the public_html directory.
    Does anyone know how i can fix this? I'm a complete noob in this subject.
    Thank u for reading

    Could you post a link please?
    BC does not give that message - Would be good to see if it is indeed BC.

  • Is it possible to change the page of a linked PDF without relinking?

    Is it possible to change the page of a linked PDF without relinking and going through the import options?
    I'm trying to import seveeral pages of the same PDF. The process would be quickest if I could import it once, then duplicate the image box a number of times, then just change the page number each image box is linking to.
    At the moment I'm having to relink (or place), then go through Import Options, then choose the page - it's a long process that feels like it should be quicker.
    Any ideas?
    Thanks

    The short answer is no, that's not possible, but it IS possible to import multiple pages at one time.
    My favorite script for this is from Scott Zanelli: InDesignSecrets » Blog Archive » Zanelli Releases MultiPageImporter for Importing both PDF and INDD Files, but there's also a sample script included with ID.

  • Replacing nav bar--is there a way to change all pages at once?

    I widened my site off of an iweb template and now the nav bar looks bad since it's too narrow and there is text that appears outside of the nav bar background. Since I can't change the color or looks of the nav bar, I've decided to put my own on top of it. This means if I have any changes down the line, I have to change the nav bar on every page. I have a page that nothing is linked to where I save graphic elements, so I can copy it, and paste on each page--a hassle when you have 50+ pages, and no idea how many pages I'll have in the end. IT was nice to have the automatic nav bar and header/footer, but boy how stupid to not be able to edit them unless you're a tech geek and understand all the coding!!

    a hassle when you have 50+ pages
    You should try it when you have 170+ pages!
    No, there is no simple way to change all pages at once. I use exactly the same method as you are doing now. Having proper user definable templates is on my wish list for future releases of iWeb.
    Michael
    iMac 20" Intel Core Duo 2GHz

  • Change the Page Title for all the pages when viewing the Reports in Bi Publisher

    Hello ,
    I have a requirement for changing the Page Title for all the report displayed pages on the browser window.

    As far as I know, answer is NO.
    it's very simple answer  Manikandan-S-Oracle
    for 1210326 's requirements there are some places for changes of property "title" and in some pages "title" can be different
    "one place or option for changing" does not exist imho ( may be i'm wrong )
    so you can change places for your needs but not sure what it's adequate
    as example
    ...wls\user_projects\applications\bipdomain\xmlpserver\catalog\navigator.jsp  -->  find <title>
    it changes title in http://somehost:7001/xmlpserver/servlet/catalog
    ... wls\user_projects\applications\bipdomain\xmlpserver\home\home.jsp  -->  find <title>
    it changes title in http://somehost:7001/xmlpserver/servlet/home

  • How can I change the page size of a scanned PDF document?

    How can I change the page size of a scanned PDF document?
    I scanned a 50-page document with an HP 5610xi All-In-One using the software that comes with it: HP Scan Pro. Though the physical document has standard 8.5" x 11" pages, the PDF resulting from scanning has page size set to 35.42 × 48.67 inches (according to Preview's "Tools > Inspector". I want to resize the pages to 8.5" x 11". Shouldn't Preview be able to do that with "Tools > Adjust Size..."? When I try, the menu option is grey so I can't select it.
    I'm using Preview Version 4.2.

    Thanks for the insight; that explains why it's the wrong size. I selected 300dpi scanning (which is the default, actually), but HP Scan Pro evidently created a PDF with 72dpi indicated. I want it fixed because I want to distribute the file to other people and have them able to print or display it without problems.
    I still don't know why Preview won't let me change it, but your question about whether I wanted to print it did lead me to find a workaround: "File > Print" and "Save as PDF..." saved it with the correct page size.

  • How do you change default page size in pdf?

    I purchased CREATE solely to create a pdf file from a scanned document. I created the PDF but the default page size is 30.15 x 20.83 INCHES. I cannot seem to change the page size. I called support services 4 times (talking with Sakthivel, Shashank, Medhet, and one other.) Each time they indicated that they would connect me to the correct people and they disconnected. I want some answers please. This seems to be a simple question. Is Adobe CREATE merely a scam?

    CreatePDF, perhaps?  Try the forum at http://forums.adobe.com/community/createpdf

  • In a document with several sections, in section VIII and IX one cannot select the text of the page foot nor set the pointer in it; so, one cannot write nor change the page foot text. Please help!

    in a document with several sections, in section VIII and IX one cannot select the text of the page foot nor set the pointer in it; so, one cannot write nor change the page foot text. Please help!

    Question already asked and answered several times.
    It's a bug striking in long documents.
    Select a word somewhere higher in the page then use the arrows to reach the wanted insertion point.
    Yvan KOENIG (VALLAURIS, France) mardi 23 août 2011 15:44:24
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please :
    Search for questions similar to your own
    before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

Maybe you are looking for

  • Windows 7 64bit and iTunes

    Trying to burn an album that I bought through iTunes store to cd so I can play it in my car. On one drive, it attempts to burn the CD, but it fails. On the other drive, nothing happens at all. It says checking media, and then goes back to just a norm

  • Suppress AWT

    I have extended a awt class in my java application. Somehow, it pop up a GUI window. Is there any parameter I can pass to the JVM so it will ignore all the GUI bits? I just want to have a pure console java application. Many Thanks! Art.

  • Use between in IF statement

    How to use between statement in IF statement. if date is in betweem 12.07.2007  & 31.12.9999. thanks in advance

  • How to fixed a cracked screen

    What can I do to get my screen fixed without a warrenty

  • Org Specific Purchasing Category Structure and Values

    Hi I have an instance with 2 separate organisations defined under 1 business group. Each organisation requires its own purchasing category structure and values. I cant seem to be able to achieve setting each org with its own values using a different