Search Results

Search found 1043 results on 42 pages for 'forgot'.

Page 12/42 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • change password code error

    - by ejah85
    I've created a code to change a password. Now it seem contain an error. When I fill in the form to change password, and click save the error message: Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in C:\Program Files\xampp\htdocs\e-Complaint(FYP)\userChangePass.php on line 103 Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in C:\Program Files\xampp\htdocs\e-Complaint(FYP)\userChangePass.php on line 103 I really don’t know what the error message means. Please guys. Help me fix it. Here's is the code: <?php session_start(); ?> <?php # change password.php //set the page title and include the html header. $page_title = 'Change Your Password'; //include('templates/header.inc'); if(isset($_POST['submit'])){//handle the form require_once('connectioncomplaint.php');//connect to the db. //include "connectioncomplaint.php"; //create a function for escaping the data. function escape_data($data){ global $dbc;//need the connection. if(ini_get('magic_quotes_gpc')){ $data=stripslashes($data); } return mysql_real_escape_string($data, $dbc); }//end function $message=NULL;//create the empty new variable. //check for a username if(empty($_POST['userid'])){ $u=FALSE; $message .='<p> You forgot enter your userid!</p>'; }else{ $u=escape_data($_POST['userid']); } //check for existing password if(empty($_POST['password'])){ $p=FALSE; $message .='<p>You forgot to enter your existing password!</p>'; }else{ $p=escape_data($_POST['password']); } //check for a password and match againts the comfirmed password. if(empty($_POST['password1'])) { $np=FALSE; $message .='<p> you forgot to enter your new password!</p>'; }else{ if($_POST['password1'] == $_POST['password2']){ $np=escape_data($_POST['password1']); }else{ $np=FALSE; $message .='<p> your new password did not match the confirmed new password!</p>'; } } if($u && $p && $np){//if everything's ok. $query="SELECT userid FROM access WHERE (userid='$u' AND password=PASSWORD('$p'))"; $result=@mysql_query($query); $num=mysql_num_rows($result); if($num == 1){ $row=mysql_fetch_array($result, MYSQL_NUM); //make the query $query="UPDATE access SET password=PASSWORD('$np') WHERE userid=$row[0]"; $result=@mysql_query($query);//run the query. if(mysql_affected_rows() == 1) {//if it run ok. //send an email,if desired. echo '<p><b>your password has been changed.</b></p>'; include('templates/footer.inc');//include the HTML footer. exit();//quit the script. }else{//if it did not run OK. $message= '<p>Your password could not be change due to a system error.We apolpgize for any inconvenience.</p><p>' .mysql_error() .'</p>'; } }else{ $message= '<p> Your username and password do not match our records.</p>'; } mysql_close();//close the database connection. }else{ $message .='<p>Please try again.</p>'; } }//end oh=f the submit conditional. //print the error message if there is one. if(isset($message)){ echo'<font color="red">' , $message, '</font>'; } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <body> <script language="JavaScript1.2">mmLoadMenus();</script> <table width="604" height="599" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="130" colspan="7"><img src="images/banner(E-Complaint)-.jpg" width="759" height="130" /></td> </tr> <tr> <td width="100" height="30" bgcolor="#ABD519"></td> <td width="100" bgcolor="#ABD519"></td> <td width="100" bgcolor="#ABD519"></td> <td width="100" bgcolor="#ABD519"></td> <td width="100" bgcolor="#ABD519"></td> <td width="160" bgcolor="#ABD519"> <?php include "header.php"; ?>&nbsp;</td> </tr> <tr> <td colspan="7" bgcolor="#FFFFFF"> <fieldset><legend> Enter your information in the form below:</legend> <p><b>User ID:</b> <input type="text" name="username" size="10" maxlength="20" value="<?php if(isset($_POST['userid'])) echo $_POST['userid']; ?>" /></p> <p><b>Current Password:</b> <input type="password" name="password" size="20" maxlength="20" /></p> <p><b>New Password:</b> <input type="password" name="password1" size="20" maxlength="20" /></p> <p><b>Confirm New Password:</b> <input type="password" name="password2" size="20" maxlength="20" /></p> </fieldset> <div align="center"> <input type="submit" name="submit" value="Change My Password" /></div> </form><!--End Form--> </td> </tr> </table> </body> </html>

    Read the article

  • Decent profiler for Windows?

    - by olliej
    Does windows have any decent sampling (eg. non-instrumenting) profilers available? Preferably something akin to Shark on MacOS, although i am willing to accept that i am going to have to pay for such a profiler on windows. I've tried the profiler in VS Team Suite and was not overly impressed, and was wondering if there were any other good ones. [Edit: Erk, i forgot to say this is for C/C++, rather than .NET -- sorry for any confusion]

    Read the article

  • Removing a file from TortoiseHG data source

    - by Hossein Margani
    Hi! I am using TortoiseHG for source code control in Windows, I forgot to edit the ".hgignor" file, and now I have a huge folder ".hg" which I know it's because of DLL and EXE and PDB files which I do not need them. Now changing the ignor file does not remove those files. What should I do for deleting these files completely from my TortoiseHg data source? Thank you.

    Read the article

  • How do I go up a level in a doc root?

    - by ggfan
    I have a folder admin that has config.php, admin.php. I want to get navmenu.php in the includes folder. How do I go up a level from admin.php then to navmenu.php? admin config.php, admin.php includes navmenu.php easy question but I forgot what the name is so i can't seem to google it...

    Read the article

  • returning JSON response to a ajax call prompts file download containing the response

    - by user200018
    i am submitting a from using jQuery ajax, and server is returning json response. but instead of the script, parsing the json result, the browser is prompting me to download the json response. I have had this problem before, where i forgot to return false at the end of the event handler. But this time im clueless why this is happening. anyone has experienced this problem.. thanks

    Read the article

  • reset root password in mysql without access to mysql table

    - by Rik89
    I am having an issue on OS X 10.7.5 as I used to use MAMP but for .htaccess issues I am now using my own compiled local server from a long time ago, the problem is i forgot the root password for mysql. I have tried updating the password through terminal using mysql -u root, but I get this error message - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Thanks Ric

    Read the article

  • Most inappropriate function or variable names you have encountered?

    - by Andrioid
    I was reading through my daily doze of RSS when I noticed a link to the python compiler documentation where class names like assList, assName and assTuple exist. While starting names with 'ass' is perfectly acceptable to me, it just sparked this idea that there probably exist much better examples of this. Have you personally used or otherwise encountered any inappropriate function or variable names? Personally I have used 'crap' and 'moo' for temporary purposes, forgot them and at a later point they came too integrated for me to bother with fixing them.

    Read the article

  • Does SQL Server have any kind of magic undo feature?

    - by Andrew G. Johnson
    Long story short is I tried to quickly update a single row in SQL Server using the Management studio and just typed UPDATE table SET column='value' and forgot the WHERE other_column='other_value' portion. Went for lunch, came back and theres 15 unread emails waiting for me. Happened about an hour ago, waiting for the database guy to come back to see when the last backup was. There's no magic UNDO feature though is there?

    Read the article

  • How To Bind ComboBox With ListItems in windows Forms?

    - by hatem gamil
    hi all i want to make a 2 comboBoxes ,the first one shows Hours and the Second Shows minutes but i cant do so in windows application as i have working as a web dev for a while and i forgot so i want to declare listItems then bind it to combo box i want to make it as a custom control so i want some help to tell me how to do that i am using VS 2008 thnxx

    Read the article

  • Opinion of Hosted SVN providers?

    - by JP
    What is your opinion of the various online Hosted SVN providers? How do they all compare? I'm looking for thoughts on Assembla, Unfuddle, BeanStalk, CVSDude, ProjectLocker, and any others that I forgot to mention. Thanks for your insight and input.

    Read the article

  • Why is the compiler not complaining about an additional ',' in Array or Object Initializers?

    - by Danvil
    Using simple type like class A { public int X, Y; } with object intializers, one can write var a = new A { X=0, Y=0 }; But the following is also accepted by the compiler: var a = new A { X=0, Y=0, }; // notice the additional ',' Same for int[] v = new int[] { 1, 2, }; This looks a bit strange ... Did they forgot to reject the additional ',' in the compiler or is there a deeper meaning behind this?

    Read the article

  • How to check if numbers are in correct sequence?

    - by Nazariy
    I have a two dimensional array that contain range of numbers that have to be validated using following rules, range should start from 0 and follow in arithmetic progression. For example: $array = array(); $array[] = array(0);//VALID $array[] = array(0,1,2,3,4,5);//VALID $array[] = array("0","1");//VALID $array[] = array(0,1,3,4,5,6);//WRONG $array[] = array(1,2,3,4,5);//WRONG $array[] = array(0,0,1,2,3,4);//WRONG what is most efficient way to do that in php? UPDATE I forgot to add that numbers can be represented as string

    Read the article

  • How can c let a function declaration with any parameter type ?

    - by kamil çakir
    I forgot to write void parameter but it works the i put void it gives error it lets this: print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i it says"previos implicit declaration was here " (means the call in main) void print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i

    Read the article

  • A problem in my windows boot menu

    - by user210332
    Hi, One i had kept a supervisor password to my windows boot screen, but now i forgot that password, Now i am unable to access the boot menu since its asking the password, all menu options are disabled. Is it possible to remove that password and can i get the boot menu default settings back? Processor: Intel Pentium dual core (2) OS : XP Thanks in Advance,

    Read the article

  • JPA and hibernate for Flex

    - by dejaninic
    I'm using JPA but I'm not sure how to use it for relation between two classes. I need to connect them @OneToMany. I have done this before but forgot. Is there any good tutorial for this or an example that is easy to understand. By the way this is a Flex application where I'm using BlazeDS for connection between Java and Flex.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >