Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'hash'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 2 results

  1. I have a need to generate many (50+) accounts. I can do this rather easily directly in the DB using PHPMyAdmin or the like. EXCEPT for the passwords. I am following the password creation methods using a hash as you have laid out in your book. Thus I cannot figure a way to create them directly in the DB because of the hash encoding used in the PHP code. Is there a way to create passwords without having to create them in the registration / edit user pages? Can it be done directly in something like PHPMyAdmin? Alternatively, is there a way to quickly create multiple accounts? (They could even have all the same password in this particular case I need). Hopefully the topic and questions make sense. Thanks! --David
  2. Hi Larry and fellow forum members, I've so far found this forum to be extremely helpful in finding answers to most questions that arises while I'm reading the book. However, as I've just finished reading chapter 9, I'm having some difficulty in understanding the gist of the sub-section called 'Creating Representative URLs'. So, here are my questions : 1) The following is the first script included in this section: var hash = window.location.hash; // Includes the # var content = hash.charAt(1); // Get the second character switch (content) { case 2: // Show tab 2. break; case 3: // Show tab 3. break; case 1: default: // Show tab 1. break; } Then it's followed by the paragraph that says: 'The actual specifics for how you change the content will be explained later in the chapter '. So, can I assume that there are some missing code that should be added within or after the above code in order to change the content (I wonder what these codes are). But what does he mean anyway- to change the content? I thought this section is meant to show us how to create page bookmarks using the window.location.hash property. 2) Then those were immediately followed by: 'For this to work, the JavaScript also has to update the URL when the page’s state changes. Say the setTab() function is called when the user clicks on a tab and it takes the event as an argument: ' function setTab(e) { if (typeof e == ‘undefined’) var e = window.event; } Is that all to it for declaring the setTab() function? I thought it's supposed to contain some onclick event handling code to be declared within the function. If I'm right, what might the code be like? 3) Next comes the following paragraph and one line of code: 'Using the event’s target or srcElement property (depending upon the browser; see Chapter 8), the function would know which tab to show. If the function gets that information and stores it in the tab variable, the JavaScript can then dynamically change the URL accordingly: ' window.location.hash = ‘#’ + tab; Here, I assume that we have to write some code that declare a function that reference the event target and also create a variable named 'tab' that get its value from referencing some HTML elements. But, what should the tab variable reference to? Perhaps the id of the tab that the user click on (which one must procure through the e.target/e.srcElement property). Again, I assume some additional code must be missing. 4) The section ends with: 'And that’s all there is to it (in theory). The user can bookmark the page and return to it in the same state as it was when the user left. Even if the user were to refresh the page, the state would remain the same. ' I could barely grasp the theory at this point. But what I'm more interested in is: how to put them in practical use. Just how one can 'bookmark the page and return to it in the same state as it was when the user left'. How does the complete script for such an application look like? 5) The end of the chapter return to the discussion of the above topic. It shows how to update the hash value as one uses the Back and Forward buttons to navigate. And, these code are provided: var hash = window.location.hash; var hashWatcher = setInterval(function() { if (window.location.hash != hash) { // Changed! updatePage(); }}, 1000); // Every second. Ok, perhaps this part is not difficult to understand. But, still, the whole chapter didn't address the solution (at least not to my satisfaction) to the question of how to share the specific tab information (i.e., browser state) with another person, as it was brought up at the beginning of the section 'Creating Representative URLs'. As no one has mentioned this part of the book in the forum yet, I wonder if I'm the only one to have overlooked something (up to chapter 9) that might help clearing the uncertainties that I have on this topic. Or, perhaps, by charging on with the rest of the book, I would eventually find the solution written somewhere.
×
×
  • Create New...