
Get started building a functioning news website with PHP by learning PHP basics and object oriented programming, practicing concepts, and following the course structure with questions and pacing.
Review the course files for the PHP newspaper site, learn the index, header, hero, and list structure, and prepare for database connection and configuration in the next lecture.
Create the news database and a users table with fields such as id, name, email, password, profile picture, and role, and set up a PHP database connection via config file.
Implement login and register pages guarded by sessions in php, validating credentials against a users table and redirecting to the admin area when authenticated.
refine the register page by adding admin paths, include fields for first name, last name, email, and password with labels, and prepare the includes handler for login.
Validate the registration form in a php news site by building a safe form handler, sanitizing inputs with a clean function, and preparing post data for database insertion.
Learn to validate a registration form in php by checking first name, last name, email, and password, handling errors with an errors array, then redirecting back with messages.
Validate the registration form, create a username from first and last name, hash the password with md5, assign a random profile image, and insert the user into the database.
learn how to implement user login for an admin panel in php, including login form handling, database verification, password hashing, and session management to secure access.
Define a PHP user class with a database connection, build a profile page to display and edit user details, and support profile picture uploads via a photo class.
Explore retrieving a user's remaining details from the database, including id, profile picture, and role, by querying the users table with the username.
Refactor the profile page in a PHP news site by cleaning user data display, trimming unused fields, and modularizing the profile form while leveraging the user object and admin role.
Learn to display a profile form conditionally when the logged-in user matches the profile owner, using PHP session checks and user data.
Learn to prepare and display user profile data in PHP by retrieving the user ID, querying the database for first name, last name, and email, and building an update form.
Update the user profile on a php news site by building an update user function that processes form data (name, email, password, photo) and updates the database using user id.
Fixes the previous lecture's bugs by updating the user name and session handling, verifies name changes, and previews adding a user profile image with a change button.
Upload the user profile picture by building a file input form and posting multipart data. Save the image to assets/images/profiles and update the user record to display the new photo.
Create a PHP category class and a two-column categories table with category title as the primary key, and add a method to insert new categories.
Add categories to the database by building a post method PHP form linked to the category table, styled with bootstrap, and test with sample categories like trending and international.
Build a PHP driven news site feature by creating an HTML table to display categories, using Bootstrap table classes, and conditionally showing actions based on admin or editor roles.
Write a PHP method to fetch and display categories in ascending order in a table, with admin and user views and delete actions.
Learn how to prepare and update news site categories with PHP. Edit category records, create edit pages, and update names such as finance and international news.
Update categories securely in a PHP news site by implementing security measures, an admin-only update function, validating inputs, and running a MySQL update query via post.
Implement a public PHP method to delete a category by id, execute a delete from category query, and verify the deletion with a success message.
the final lecture demonstrates how to add and conditionally display navigation links in a php based news site, showing category links only to administrators and testing with login roles.
Define the news table in the database with fields for title, content, category, image, tags, status, type, and the counts for likes, comments, and views.
Build a PHP news post form by adding title, content, category, image, status, news type, tags, and a submit button.
Learn to restrict the news title input to 60 characters with a live counter. Display remaining characters and dynamically change the border color to show valid or exceeded input.
Fetch distinct categories from the database, order them by title, and render each as an option in a category select tag for the news site.
Preview the selected image before uploading by using a file input and on change event, reading it with a FileReader and updating the image source to the data URL.
Learn to handle image uploads in PHP by validating file extension and size, generating a unique file name, and moving the image to the news_images directory.
Create a PHP class to add news, with a constructor and add news method that validates title, content, category, and tags, then saves to the database.
Instantiate the Post class and populate title, content, category, status, tags, and image, then insert the news into the database for publishing breaking or casual news.
Display the categories on the front page by querying the category table, ordering by title ascending, and rendering links with category id and title in a front page loop.
Display an admin-only add post link in the news site sidebar, enable posting a new item with category and image, and verify the link appears after administrator login.
Retrieve breaking news from the database by selecting posts where type equals breaking news within the last 10 hours and display them on the front page in random order.
Develop a PHP breaking news feature by calculating time intervals from post dates to now and displaying items within ten hours on the front page's feature posts.
Create a gets_featured_news method that selects five random news items from the news table, ordered by random, for the sidebar, returning image, date, content, and category.
Debug and refine a php news site by handling breaking news logic, preventing stale posts, fixing undefined index errors, and managing user sessions for the header and front page.
Display casual news by querying casual posts, sorting by id desc, limiting to ten, and rendering id, category, image, 200-char content, plus likes and comments.
Implement a search bar in a PHP news site by querying posts whose tags match the keyword, order results descending, limit to 10, and display no results when empty.
Implement a PHP search bar for the news site, wiring the index to save and query posts by keyword. Test with terms like halo and politics.
Learn to fetch and display news posts by category in a PHP news site, using category IDs to filter results and render category pages.
Download and extract the Section 7 zip file, replace your existing project files with its contents, and copy all files to ensure news, related, and other page inclusions stay consistent.
Fetch a single news post by id in a PHP-driven page, retrieving title, content, category, image, tags, and engagement metrics to render the full post.
Apply a foreach loop to iterate over article tags, build a tag string, and compose URLs with a tag query parameter, then render styled tag links for navigation.
Learn to increment a news post's view count each time a user clicks a post by reading the post id, querying current views, and updating the database.
Fetch related news posts by category in a PHP site, using SQL to select by category, order randomly, and limit to four, then display image, category, and content.
Learn to add a timestamp column in php news site, rename fields to avoid conflicts, and implement get popular posts method that retrieves top news by views in last week.
Display news by tapping a tag and show all related articles on a PHP news site, using a get news by tags function to fetch tagged posts.
Create a PHP news display for world and international news by coding a post class, querying recent posts, and formatting titles, previews, images, and dates.
Display the four most popular posts of the week on a PHP news site by querying recent popular news, limiting to four, and linking to single posts.
Add and link all news items to the single post pages by pulling links, images, titles, categories, and tags from the database, ensuring consistency and avoiding broken links.
Add users to the administration panel using PHP, validating input, cleaning data, and inserting new users with roles and default profile pictures.
learn to add a get posts count method in the users class that queries the posts table by username to display each user's post count, with an admin link.
Builds a comments table for news posts with id, post_id, name, email, website, body, and status, and adds a PHP method to insert unapproved comments.
Implement comment submission by instantiating a comments object with the database connection, processing the form input (name, email, body, website), and inserting the comment for post id with pending approval.
Prepare the data for display by loading comments from the database and displaying anonymous names when empty. Allow any logged-in user to approve or unapprove comments via status-based links.
Display and manage user comments in an admin table by loading comments, echoing data, and toggling status between unapproved and approved.
Learn to approve and un-approve comments in a PHP news site by updating comment status and displaying only approved comments on the admin and comments pages.
Display and manage comments in the news feed by querying approved posts, showing comment bodies and authors, and tracking the number of unapproved comments for dynamic updates.
Create and secure subscriber authentication for a PHP-based news site by building register and login forms with Bootstrap, posting data, and linking pages for a seamless subscriber experience.
Register subscribers by creating a subscribers table with id, name, email, and password, then hash the password and save the data via a PHP post request.
Log in subscribers for a PHP news site by validating the login form, retrieving the subscriber by email, hashing with password_hash, verifying with password_verify, then starting a session and redirecting.
Learn to log out subscribers securely in PHP by unsetting the subscriber session instead of destroying the whole session, then redirect to the index page.
Welcome to this course my dear student. In this course we will create a fully functional news website from scratch using PHP and MySQL.
All you need to do is get your PC, MAC or Laptop ready for coding.
Firstly you must have a basic understanding of PHP both procedural, functional and OOP.
Don't worry everything will work out fine.
I have designed the course in such a way that it won't bore you out, I promise you that for sure.
There will be stages that things will seem not to make sense to you but all you need to do is take a break either coffee break or a walk then come back to the course and have the full benefit of it.
With all these said, i hope to see you in the course.
I have designed the course in such a way that it won't bore you out, I promise you that for sure.
There will be stages that things will seem not to make sense to you but all you need to do is take a break either coffee break or a walk then come back to the course and have the full benefit of it.
With all these said, i hope to see you in the course.