title
3. E - Commerce Website Tutorial - Create the PHP Admin Log In System

description
In this 3rd video we will create the Admin Log In System for managing inventory and other store functions in the back end. We demonstrate a scripted method for database table creation in this example. The E - Commerce Web Site we will be assembling is one in which all of the inventory is in a MySQL database and we offer a custom PHP cart for a unique shopping experience. It is a site that handles sales, customers, and inventory.

detail
{'title': '3. E - Commerce Website Tutorial - Create the PHP Admin Log In System', 'heatmap': [{'end': 660.921, 'start': 624.407, 'weight': 0.905}, {'end': 1191.348, 'start': 1168.692, 'weight': 0.754}], 'summary': 'This tutorial series on e-commerce website management covers building a secure admin area with php sessions, fixing broken images, rendering content in the browser, setting up store admin, managing inventory, and securing the admin area with session variables and database queries.', 'chapters': [{'end': 318.535, 'segs': [{'end': 61.523, 'src': 'embed', 'start': 10.964, 'weight': 0, 'content': [{'end': 15.166, 'text': 'hello everybody and welcome to part three of our e-commerce website lesson series,', 'start': 10.964, 'duration': 4.202}, {'end': 22.39, 'text': 'in which we are demonstrating how to construct custom online marketplaces from the ground up using open source technologies.', 'start': 15.166, 'duration': 7.224}, {'end': 26.993, 'text': 'in this particular lesson, we will construct our admin area for the store owner,', 'start': 22.39, 'duration': 4.603}, {'end': 34.605, 'text': 'a secure part of the website where a person or persons without coding knowledge can manage inventory and other things to do with the store.', 'start': 26.993, 'duration': 7.612}, {'end': 61.523, 'text': "Okay, so to create the admin area, we're going to need a new directory and an index page to start off with inside of that directory.", 'start': 53.396, 'duration': 8.127}], 'summary': 'Demonstrating how to construct an admin area for e-commerce website owners using open source technologies.', 'duration': 50.559, 'max_score': 10.964, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w10964.jpg'}, {'end': 196.441, 'src': 'embed', 'start': 170.384, 'weight': 1, 'content': [{'end': 182.432, 'text': 'There. now that you have the full HTTP in that source attribute, it will connect to that image file, no matter what directory this header is planted into.', 'start': 170.384, 'duration': 12.048}, {'end': 184.774, 'text': "And you'll still see broken images.", 'start': 182.452, 'duration': 2.322}, {'end': 191.058, 'text': "Now you see one on both index pages, you'll see broken images in Dreamweaver on your local machine.", 'start': 184.854, 'duration': 6.204}, {'end': 196.441, 'text': "And when you put these files online, that'll be the logo file sitting right there.", 'start': 191.898, 'duration': 4.543}], 'summary': 'Using full http in source attribute can cause broken images on index pages and in dreamweaver.', 'duration': 26.057, 'max_score': 170.384, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w170384.jpg'}, {'end': 275.329, 'src': 'embed', 'start': 247.758, 'weight': 2, 'content': [{'end': 252.041, 'text': 'And this is necessary if you want to work with session cookies in PHP.', 'start': 247.758, 'duration': 4.283}, {'end': 256.584, 'text': 'And what sessions do is help you have persistent data.', 'start': 252.581, 'duration': 4.003}, {'end': 261.721, 'text': "So if they're not logged in, you know there won't be a session variable established.", 'start': 257.438, 'duration': 4.283}, {'end': 266.204, 'text': "But after they do use the login form that we're going to build right now,", 'start': 262.541, 'duration': 3.663}, {'end': 270.226, 'text': "they would have their session variable established and you'd know that they're allowed to be in here.", 'start': 266.204, 'duration': 4.022}, {'end': 275.329, 'text': 'So using what we know about cookies, we can pop in a little if condition like this.', 'start': 271.047, 'duration': 4.282}], 'summary': 'Working with session cookies in php allows for persistent data and user authentication.', 'duration': 27.571, 'max_score': 247.758, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w247758.jpg'}], 'start': 10.964, 'title': 'E-commerce website management', 'summary': 'Covers building a secure admin area for an e-commerce website using open source technologies, fixing broken images in the website header to ensure proper display online, and creating secure web pages with php sessions for user authentication and access control.', 'chapters': [{'end': 145.895, 'start': 10.964, 'title': 'Building e-commerce admin area', 'summary': 'Demonstrates constructing a secure admin area for an e-commerce website, allowing non-coders to manage inventory and other store-related tasks, using open source technologies and creating new directories and index pages.', 'duration': 134.931, 'highlights': ['The chapter demonstrates constructing a secure admin area for an e-commerce website, allowing non-coders to manage inventory and other store-related tasks, using open source technologies (e.g., directory creation, index page setup).', 'The tutorial emphasizes the importance of creating a new directory and an index page to start off the construction of the admin area, ensuring easy management for store owners without coding knowledge.', 'The process involves ensuring proper linking to the style sheet and templates by creating relative links and utilizing dot dot forward slash to navigate directories.', 'The chapter highlights the flexibility to address potential issues by adapting from relative links to full path links in case of template header or footer connection problems.']}, {'end': 220.703, 'start': 146.676, 'title': 'Fixing broken images in website header', 'summary': 'Explains how to fix broken images in a website header by ensuring the full http path is specified in the image source attribute, preventing broken images on local machines and guaranteeing proper display online.', 'duration': 74.027, 'highlights': ['By specifying the full HTTP path in the image source attribute, the header will connect to the image file regardless of the directory, ensuring no broken images on local machines and online.', 'Ensuring the full path to the logo in the style folder eliminates the possibility of broken images, providing a guarantee of proper display.', 'The broken image issue is resolved by opening the template header in the main directory and updating the image source attribute with the full HTTP path, preventing broken images on both index pages and ensuring correct display on local machines and online.']}, {'end': 318.535, 'start': 221.544, 'title': 'Creating secure pages with php sessions', 'summary': 'Covers the process of securing web pages using php sessions, ensuring that unauthorized users are redirected to the login page, and allowing access only after successful login.', 'duration': 96.991, 'highlights': ['Using PHP sessions to establish persistent data and verify user login status, ensuring unauthorized access prevention.', 'Implementing a conditional statement to redirect unauthorized users to the admin login page, ensuring secure access control.', "Including 'session_start' in the code to work with session cookies in PHP, essential for managing user login status."]}], 'duration': 307.571, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w10964.jpg', 'highlights': ['The chapter demonstrates constructing a secure admin area for an e-commerce website, using open source technologies.', 'By specifying the full HTTP path in the image source attribute, the header will connect to the image file regardless of the directory, ensuring no broken images on local machines and online.', 'Using PHP sessions to establish persistent data and verify user login status, ensuring unauthorized access prevention.']}, {'end': 640.848, 'segs': [{'end': 358.239, 'src': 'embed', 'start': 319.235, 'weight': 0, 'content': [{'end': 322.616, 'text': 'So the page will continue on, and it will render into the browser.', 'start': 319.235, 'duration': 3.381}, {'end': 325.397, 'text': 'So you can put any content that you want.', 'start': 322.836, 'duration': 2.561}, {'end': 330.379, 'text': "Like for instance, here I'm going to put in just a couple of questions.", 'start': 326.637, 'duration': 3.742}, {'end': 332.039, 'text': "I'm just going to add a div here.", 'start': 330.739, 'duration': 1.3}, {'end': 343.543, 'text': "And that div I'm going to give some padding.", 'start': 340.662, 'duration': 2.881}, {'end': 351.217, 'text': "I'm gonna put a style padding padding left, 24 pixels.", 'start': 344.116, 'duration': 7.101}, {'end': 357.478, 'text': 'actually, let me make that margin left there.', 'start': 351.217, 'duration': 6.261}, {'end': 358.239, 'text': "that's better.", 'start': 357.478, 'duration': 0.761}], 'summary': 'Rendering content with padding and margin for web page.', 'duration': 39.004, 'max_score': 319.235, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w319235.jpg'}, {'end': 558.502, 'src': 'embed', 'start': 529.921, 'weight': 1, 'content': [{'end': 531.922, 'text': "just put the day you're creating it.", 'start': 529.921, 'duration': 2.001}, {'end': 535.645, 'text': 'if you want to add somebody else at this point, you can add them right there.', 'start': 531.922, 'duration': 3.723}, {'end': 540.581, 'text': "but I'm just going to add me for now And you can choose to.", 'start': 535.645, 'duration': 4.936}, {'end': 546.108, 'text': "so let's browse that now and you can see that we have one admin inside the system.", 'start': 540.581, 'duration': 5.527}, {'end': 555.719, 'text': "You can choose to hash this password using some kind of salt hash, like md5 or something like that, but that's up to you.", 'start': 546.748, 'duration': 8.971}, {'end': 558.502, 'text': 'But if you want to be extra secure, you can.', 'start': 556.601, 'duration': 1.901}], 'summary': 'Creating an admin user with the option to hash the password for extra security.', 'duration': 28.581, 'max_score': 529.921, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w529921.jpg'}, {'end': 640.848, 'src': 'embed', 'start': 613.254, 'weight': 2, 'content': [{'end': 623.567, 'text': 'because people can use Firefox and other tools to create cookies out of thin air to try to forge things on login type sites.', 'start': 613.254, 'duration': 10.313}, {'end': 629.81, 'text': "So if they're trying to forge a cookie and they're just creating a cookie that's named manager,", 'start': 624.407, 'duration': 5.403}, {'end': 638.666, 'text': 'they could put any value they want inside of it and it would allow them into your index page here to see these links and everything.', 'start': 629.81, 'duration': 8.856}, {'end': 640.848, 'text': "and you don't want that, okay.", 'start': 638.666, 'duration': 2.182}], 'summary': 'Firefox and other tools can be used to create forged cookies, allowing unauthorized access to index page and links.', 'duration': 27.594, 'max_score': 613.254, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w613254.jpg'}], 'start': 319.235, 'title': 'Rendering content in browser and setting up store admin', 'summary': "Covers rendering content in the browser with styling, including padding and alignment, and the process of setting up the store admin directory, creating an admin login, and adding an admin with a username 'adam', with the option to hash the password for extra security.", 'chapters': [{'end': 384.688, 'start': 319.235, 'title': 'Rendering content in browser with styling', 'summary': 'Covers rendering content in the browser, adding padding and aligning content, with an example of adding questions and paragraphs with specific styling.', 'duration': 65.453, 'highlights': ['The div is given a margin of 24 pixels to take it off the side and aligns its content to the left.', 'Adding a paragraph with specific styling, such as making it an H2 element.', 'Rendering content in the browser and putting any desired content, with a specific example of adding questions.']}, {'end': 640.848, 'start': 384.708, 'title': 'Setting up store admin and creating admin login', 'summary': "Covers setting up the store admin directory, creating an admin login, and adding an admin to the database with a username 'adam'. it also mentions the option to hash the password for extra security.", 'duration': 256.14, 'highlights': ["Creating admin login and adding admin to the database Discusses creating an admin login page, adding an admin to the database with the username 'Adam', and mentioning the option to hash the password for extra security.", 'Ensuring manager session value in the database for security Emphasizes the importance of verifying the manager session value in the database to prevent unauthorized access and potential cookie forging.', "Managing inventory and creating necessary links Mentions managing inventory, creating links to pages like 'inventorylist.php', and using a pound sign as a link holder."]}], 'duration': 321.613, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w319235.jpg', 'highlights': ['Rendering content in the browser and putting any desired content, with a specific example of adding questions.', "Creating admin login and adding admin to the database Discusses creating an admin login page, adding an admin to the database with the username 'Adam', and mentioning the option to hash the password for extra security.", 'Ensuring manager session value in the database for security Emphasizes the importance of verifying the manager session value in the database to prevent unauthorized access and potential cookie forging.']}, {'end': 1018.46, 'segs': [{'end': 743.623, 'src': 'embed', 'start': 680.962, 'weight': 0, 'content': [{'end': 689.547, 'text': "So now I've made sure I FTP'd my template header, my template footer, my index page, which is my store homepage, product page, product list page,", 'start': 680.962, 'duration': 8.585}, {'end': 691.228, 'text': "even though those aren't really set up yet.", 'start': 689.547, 'duration': 1.681}, {'end': 694.047, 'text': 'and put the style folder up.', 'start': 692.386, 'duration': 1.661}, {'end': 700.031, 'text': 'so everything is online now.', 'start': 694.047, 'duration': 5.984}, {'end': 707.155, 'text': 'here in the store admin folder online you have admin login and index.php.', 'start': 700.031, 'duration': 7.124}, {'end': 709.557, 'text': "so let's discuss those real quick.", 'start': 707.155, 'duration': 2.402}, {'end': 712.319, 'text': "actually, first let's test it out.", 'start': 709.557, 'duration': 2.762}, {'end': 715.161, 'text': 'so here we are on the index page of the site.', 'start': 712.319, 'duration': 2.842}, {'end': 717.462, 'text': 'this is the home page of the site.', 'start': 715.161, 'duration': 2.301}, {'end': 723.398, 'text': "let's go to the store admin directory.", 'start': 717.462, 'duration': 5.936}, {'end': 729.66, 'text': "And we're not logged in right now, so it should usher us to the login page.", 'start': 724.838, 'duration': 4.822}, {'end': 732.3, 'text': 'See, adminlogin.php.', 'start': 730.36, 'duration': 1.94}, {'end': 737.361, 'text': "That's how the index page of the store admin area works.", 'start': 733.481, 'duration': 3.88}, {'end': 743.623, 'text': "If you're not logged in, it sends you to the admin login page, which is within the store admin area.", 'start': 737.662, 'duration': 5.961}], 'summary': "Ftp'd template and style files, discussed admin login and index page, tested site functionality.", 'duration': 62.661, 'max_score': 680.962, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w680962.jpg'}, {'end': 804.275, 'src': 'embed', 'start': 775.014, 'weight': 2, 'content': [{'end': 779.076, 'text': 'And now that the person is logged in, they see different data than they did a second ago.', 'start': 775.014, 'duration': 4.062}, {'end': 782.257, 'text': "When they weren't logged in, they got ushered to a login page.", 'start': 779.496, 'duration': 2.761}, {'end': 787.119, 'text': 'So now I have a link that says Manage Inventory and Manage Blah Blah.', 'start': 783.097, 'duration': 4.022}, {'end': 789.64, 'text': 'Manage Blah Blah is set to nothing yet.', 'start': 787.899, 'duration': 1.741}, {'end': 798.964, 'text': 'Manage Inventory I set to a page called InventoryList.php, which is going to be within the store admin area.', 'start': 790.16, 'duration': 8.804}, {'end': 804.275, 'text': 'So now, let me explain to you, we can close template header.php.', 'start': 800.134, 'duration': 4.141}], 'summary': 'Logged-in users access different data, including manage inventory and manage blah blah, with inventorylist.php in the store admin area.', 'duration': 29.261, 'max_score': 775.014, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w775014.jpg'}, {'end': 939.719, 'src': 'embed', 'start': 909.037, 'weight': 3, 'content': [{'end': 910.358, 'text': 'The one is session manager.', 'start': 909.037, 'duration': 1.321}, {'end': 914.16, 'text': 'one is session password and, like I said,', 'start': 911.318, 'duration': 2.842}, {'end': 922.646, 'text': 'sessions are a way to create variables for yourself that are persistent data that you can carry from page to page and they never get lost.', 'start': 914.16, 'duration': 8.486}, {'end': 926.249, 'text': 'you never have to manually transfer them from one page to the next.', 'start': 922.646, 'duration': 3.603}, {'end': 933.974, 'text': "all you have to do is claim session, start, claim the variable, grab the app, the value out of it, which we're doing here.", 'start': 926.249, 'duration': 7.725}, {'end': 939.719, 'text': "we're grabbing the value from the session ID, Session manager, session password.", 'start': 933.974, 'duration': 5.745}], 'summary': 'Sessions allow persistent data transfer between pages, eliminating manual transfers.', 'duration': 30.682, 'max_score': 909.037, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w909037.jpg'}], 'start': 640.848, 'title': 'Admin login and inventory management', 'summary': "Covers setting up admin login and template links, focusing on index page and admin login page, as well as managing inventory, session variables, and database security in store admin's scripts.", 'chapters': [{'end': 774.058, 'start': 640.848, 'title': 'Setting up admin login and template links', 'summary': 'Discusses setting up the admin login and template links for the site, including ensuring correct link navigation and online file placement, with a focus on the index page and the admin login page.', 'duration': 133.21, 'highlights': ['The index.php page and admin login page have been set up to log the user in, with a demonstration of redirecting to the admin login page when not logged in.', 'Explanation of ensuring correct link navigation and online placement of template header and footer to ensure proper display regardless of the directory they are used in.', 'FTP transfer of template header, template footer, index page, and style folder to ensure online availability of all site components.', 'Demonstration and testing of the functionality of the admin login and index page, with a walkthrough of the login process and redirection upon successful login.']}, {'end': 1018.46, 'start': 775.014, 'title': 'Store admin: inventory management system', 'summary': "Discusses the store admin's index.php and admin login.php scripts, outlining the process of managing inventory, handling session variables, and ensuring database security.", 'duration': 243.446, 'highlights': ['The chapter explains the process of managing inventory and session variables in the store admin area. The script manages inventory and session variables in the store admin area.', 'It outlines the creation and cleansing of session variables, such as session ID, manager, and password, for database security reasons. Session variables like session ID, manager, and password are created and cleansed for database security.', 'The script ensures that certain variables only contain specific characters, such as numbers and letters, for security purposes. Variables are filtered to contain only numbers and letters for security reasons.']}], 'duration': 377.612, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w640848.jpg', 'highlights': ['The index.php page and admin login page have been set up to log the user in, with a demonstration of redirecting to the admin login page when not logged in.', 'FTP transfer of template header, template footer, index page, and style folder to ensure online availability of all site components.', 'The chapter explains the process of managing inventory and session variables in the store admin area. The script manages inventory and session variables in the store admin area.', 'It outlines the creation and cleansing of session variables, such as session ID, manager, and password, for database security reasons. Session variables like session ID, manager, and password are created and cleansed for database security.']}, {'end': 1167.732, 'segs': [{'end': 1066.436, 'src': 'embed', 'start': 1019.46, 'weight': 0, 'content': [{'end': 1030.507, 'text': "So what we do in these next three lines is we're putting the values from those session variables into local variables and we're cleansing them before we query our database using those values.", 'start': 1019.46, 'duration': 11.047}, {'end': 1032.428, 'text': 'So the next line.', 'start': 1031.607, 'duration': 0.821}, {'end': 1036.382, 'text': 'is, we include the database connection file next line.', 'start': 1033.06, 'duration': 3.322}, {'end': 1043.303, 'text': 'after that is, we run a MySQL query that select all from admin, where ID equals manager,', 'start': 1036.382, 'duration': 6.921}, {'end': 1050.164, 'text': 'ID username equals manager and password equals password limit one.', 'start': 1043.303, 'duration': 6.861}, {'end': 1059.666, 'text': 'so we want to make sure that we check the database using these three pieces of data to see, in fact, if this person exists,', 'start': 1050.164, 'duration': 9.502}, {'end': 1066.436, 'text': 'because some people can use Firefox and other browsers that allow them to create cookies out of thin air.', 'start': 1059.666, 'duration': 6.77}], 'summary': "Values from session variables are cleansed and used to query the database to check for a specific person's existence using mysql query.", 'duration': 46.976, 'max_score': 1019.46, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w1019460.jpg'}, {'end': 1121.316, 'src': 'embed', 'start': 1094.399, 'weight': 2, 'content': [{'end': 1097.521, 'text': 'which is going to be a hard thing to guess all three of those and get them right.', 'start': 1094.399, 'duration': 3.122}, {'end': 1102.264, 'text': 'So the last little bit of code there is you make a variable called ExistCount.', 'start': 1098.181, 'duration': 4.083}, {'end': 1113.791, 'text': 'From this query here, we run MySQL numRows function on it, and we can get a count from how many rows were returned from that query.', 'start': 1103.144, 'duration': 10.647}, {'end': 1120.275, 'text': 'So you say if existCount equals 0, you know that that person does not exist.', 'start': 1115.151, 'duration': 5.124}, {'end': 1121.316, 'text': 'So you send them.', 'start': 1120.395, 'duration': 0.921}], 'summary': 'Using mysql numrows function to check if a person exists, with a count of rows returned.', 'duration': 26.917, 'max_score': 1094.399, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w1094399.jpg'}], 'start': 1019.46, 'title': 'Securing admin area', 'summary': 'Explains how to secure the admin area using session variables and database queries to verify user existence, preventing unauthorized access by checking for user id, username, and password.', 'chapters': [{'end': 1167.732, 'start': 1019.46, 'title': 'Securing admin area with session variables', 'summary': 'Explains how to secure the admin area by using session variables and querying the database to verify the existence of the user, preventing unauthorized access by checking for the existence of the user using their id, username, and password.', 'duration': 148.272, 'highlights': ['The chapter explains how to secure the admin area by using session variables and querying the database to verify the existence of the user. Securing admin area, using session variables, querying database, verifying user existence', 'Preventing unauthorized access by checking for the existence of the user using their ID, username, and password, which makes it hard for unauthorized users to guess all three and get them right. Preventing unauthorized access, checking user existence with ID, username, and password', 'Using MySQL numRows function to get a count from how many rows were returned from the query, and if existCount equals 0, the person does not exist, leading to an echo message and exiting the script. Using MySQL numRows function, checking if person exists, echo message, exiting the script']}], 'duration': 148.272, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w1019460.jpg', 'highlights': ['Securing admin area, using session variables, querying database, verifying user existence', 'Preventing unauthorized access, checking user existence with ID, username, and password', 'Using MySQL numRows function, checking if person exists, echo message, exiting the script']}, {'end': 1602.67, 'segs': [{'end': 1199.431, 'src': 'heatmap', 'start': 1168.692, 'weight': 0, 'content': [{'end': 1172.713, 'text': 'This really should never happen unless people are messing around trying to forge their way in.', 'start': 1168.692, 'duration': 4.021}, {'end': 1174.633, 'text': "So that's how that works.", 'start': 1173.913, 'duration': 0.72}, {'end': 1181.584, 'text': "Now let's explain adminlogin.php, which is the login script and the form.", 'start': 1175.322, 'duration': 6.262}, {'end': 1186.386, 'text': "See the little form here? Let's take a look down at the start of the doc type here.", 'start': 1182.165, 'duration': 4.221}, {'end': 1188.407, 'text': 'This is just like the other pages.', 'start': 1186.766, 'duration': 1.641}, {'end': 1191.348, 'text': 'It has a title of admin login.', 'start': 1188.427, 'duration': 2.921}, {'end': 1193.969, 'text': "It's connected to our style sheet.", 'start': 1191.368, 'duration': 2.601}, {'end': 1199.431, 'text': 'It has our template header and our template footer being dynamically loaded in.', 'start': 1194.449, 'duration': 4.982}], 'summary': 'The transcript explains the adminlogin.php, including the login script, form, and its connection to style sheet and templates.', 'duration': 30.739, 'max_score': 1168.692, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w1168692.jpg'}, {'end': 1360.231, 'src': 'embed', 'start': 1331.082, 'weight': 1, 'content': [{'end': 1334.582, 'text': 'This code only runs if they put in some data and press submit.', 'start': 1331.082, 'duration': 3.5}, {'end': 1338.063, 'text': 'So if they happen to put in some data, they press submit into the form.', 'start': 1335.103, 'duration': 2.96}, {'end': 1342.284, 'text': 'We cleanse the manager, the username, and password variables.', 'start': 1338.523, 'duration': 3.761}, {'end': 1349.906, 'text': 'So we gather the posted variable of username and the posted variable of password,', 'start': 1343.064, 'duration': 6.842}, {'end': 1353.847, 'text': 'and both of those are being filtered like we were doing the variables on the other page.', 'start': 1349.906, 'duration': 3.941}, {'end': 1355.827, 'text': "Now they're in local variables here.", 'start': 1354.327, 'duration': 1.5}, {'end': 1360.231, 'text': 'Then we include once the connect to MySQL script.', 'start': 1357.13, 'duration': 3.101}], 'summary': 'Code runs upon submission, cleanses manager, username, and password variables, filters posted username and password variables, and connects to mysql.', 'duration': 29.149, 'max_score': 1331.082, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w1331082.jpg'}, {'end': 1592.236, 'src': 'embed', 'start': 1564.433, 'weight': 2, 'content': [{'end': 1566.695, 'text': "And then you'll have your Manage Inventory page all done.", 'start': 1564.433, 'duration': 2.262}, {'end': 1568.415, 'text': "So that'll be part four.", 'start': 1567.035, 'duration': 1.38}, {'end': 1570.597, 'text': 'So stay tuned, buddies.', 'start': 1569.516, 'duration': 1.081}, {'end': 1571.817, 'text': 'Coming soon.', 'start': 1571.197, 'duration': 0.62}, {'end': 1575.94, 'text': 'And I am going to put out six tutorials before Christmas Day.', 'start': 1572.778, 'duration': 3.162}, {'end': 1577.48, 'text': "I don't care what anybody says.", 'start': 1576.16, 'duration': 1.32}, {'end': 1585.765, 'text': "The only reason we're going to have more than six is because you guys requested this admin crap to manage inventory.", 'start': 1578.121, 'duration': 7.644}, {'end': 1592.236, 'text': "So ha ha, I'm going to stick to my guns and get my six tutorials out before Christmas.", 'start': 1586.929, 'duration': 5.307}], 'summary': 'Six tutorials on managing inventory will be released before christmas, as per user request.', 'duration': 27.803, 'max_score': 1564.433, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w1564433.jpg'}], 'start': 1168.692, 'title': 'Admin login form and inventory management', 'summary': 'Explains the adminlogin.php form, its structure, and functionality, including login script, form content, php blocks, session variables, and redirection. it also outlines creating an admin login system using php and mysql, covering parsing mechanism and session variable creation, as well as upcoming tutorial schedule for managing inventory.', 'chapters': [{'end': 1305.176, 'start': 1168.692, 'title': 'Explanation of adminlogin.php form', 'summary': 'Explains the adminlogin.php form, detailing its structure and functionality, including the presence of a login script, form content, and php blocks, as well as the handling of session variables and redirection to the admin homepage.', 'duration': 136.484, 'highlights': ['The adminlogin.php form is detailed, explaining its structure and functionality, including the presence of a login script, form content, and PHP blocks.', 'The form contains fields for username and password, as well as a submit button.', 'The script includes PHP blocks that handle session variables and redirect users who are already logged in to the admin homepage.']}, {'end': 1602.67, 'start': 1306.345, 'title': 'Creating an admin login and managing inventory', 'summary': 'Outlines the process of creating an admin login system using php and mysql, detailing the logic behind the parsing mechanism, session variable creation, and the upcoming tutorial schedule for managing inventory.', 'duration': 296.325, 'highlights': ['The code includes a parsing mechanism that only runs when the submit button is clicked, ensuring that the code runs only when data is submitted, and it cleanses the username and password variables to prevent unauthorized access.', 'Session variables are created to remember user login details, functioning as temporary cookies that persist within the browsing session but get destroyed upon closing the browser.', 'The tutorial schedule is planned to release six tutorials before Christmas, with additional tutorials added due to user requests for an admin login system and inventory management, demonstrating the impact of user feedback on the content schedule.']}], 'duration': 433.978, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dZrCNhp0t_w/pics/dZrCNhp0t_w1168692.jpg', 'highlights': ['The adminlogin.php form is detailed, explaining its structure and functionality, including the presence of a login script, form content, and PHP blocks.', 'The code includes a parsing mechanism that only runs when the submit button is clicked, ensuring that the code runs only when data is submitted, and it cleanses the username and password variables to prevent unauthorized access.', 'The tutorial schedule is planned to release six tutorials before Christmas, with additional tutorials added due to user requests for an admin login system and inventory management, demonstrating the impact of user feedback on the content schedule.']}], 'highlights': ['The tutorial schedule is planned to release six tutorials before Christmas, with additional tutorials added due to user requests for an admin login system and inventory management, demonstrating the impact of user feedback on the content schedule.', 'The chapter explains the process of managing inventory and session variables in the store admin area. The script manages inventory and session variables in the store admin area.', "Creating admin login and adding admin to the database Discusses creating an admin login page, adding an admin to the database with the username 'Adam', and mentioning the option to hash the password for extra security.", 'The adminlogin.php form is detailed, explaining its structure and functionality, including the presence of a login script, form content, and PHP blocks.', 'Securing admin area, using session variables, querying database, verifying user existence', 'By specifying the full HTTP path in the image source attribute, the header will connect to the image file regardless of the directory, ensuring no broken images on local machines and online.', 'The chapter demonstrates constructing a secure admin area for an e-commerce website, using open source technologies.', 'The index.php page and admin login page have been set up to log the user in, with a demonstration of redirecting to the admin login page when not logged in.', 'Using PHP sessions to establish persistent data and verify user login status, ensuring unauthorized access prevention.', 'The code includes a parsing mechanism that only runs when the submit button is clicked, ensuring that the code runs only when data is submitted, and it cleanses the username and password variables to prevent unauthorized access.']}