Jump to content
Larry Ullman's Book Forums

tonyscarpelli

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About tonyscarpelli

  • Rank
    Newbie
  1. If I entered the same new password as the old password, an error occurred that didn't inform the user of this. The following code can be changed as needed. CU I added the following code that checks for duplicate old and new passwords: //------------------------------------------------------------------------- // Check to see if password the same $q = "SELECT user_id FROM users WHERE (email='$e' AND pass=SHA1('$np') )"; $r = @mysqli_query($dbc, $q); $num = @mysqli_num_rows($r); if ($num == 1) { //echo 'Not OK' . ' ' . $num; // for testing. $errors[] = 'Your new password is the same as your old password.'; } //------------------------------------------------------------------------- if (empty($errors)) { // If everything's OK.
  2. I can step through Javascript using Chrome or FireFox, but can't seem to find any way to do that with PHP. Is it possible to step through PHP code? Thanks.
  3. The code is in the Xampp server on my machine. Isn't that supposed to work? If it doesn't, then Xammp is not working. I am running the code from within NoteTab which calls the browser with the URL of the server. Maybe that is how I shouldn't be doing it? I'll try putting it on my web site and see how that works. Thanks.
  4. I used the Chapter 11 book code last week in Xampp after installing Xampp and it worked. This week I tried it out and it didn't work. I rebooted and removed IIS which was on my computer, but that didn't work either. After doing a bit of debugging, it turned out that the Ajax status code was 0. I changed the test.js code so that it worked with a status = 0 ( || (ajax.status == 0) ). And now it works again. So what whould make the status code turn into 0 from last week? Or, in other words, what makes the ajax status equal 0 to begin with? Confusing... Thanks.
  5. Thanks HartleySan, I installed Xampp and worked my way through some install errors, but got it to work. I put the Ajax Test book code into the server and got it to work. I have a question about this, however. Do you guys edit your code outside Xampp and copy the code into it? Or do you edit the code inside the Xampp server? Thanks.
  6. I jumped to the Ajax chapter since I needed to understand it in some other projects. I entered in the code from the book and I can't get it to work. I tried the downloaded code from the book site, and that didn't work either. Do I have to put this code in my web site or can I run it from my loacal PC? Thanks.
×
×
  • Create New...