Programming Tutorials Blog

Learn Python in 21 Days: From Beginner to Pro

At present, Python is one of the most powerful and beginner-friendly programming languages in the IT world. With an estimated 8 to 9 million developers worldwide and growing, its popularity remains unmatched. What makes Python particularly attractive to beginners is its simple, readable syntax and dynamic typing, which significantly ease the learning curve. Additionally, Python plays a crucial role in powering modern technologies such as Artificial Intelligence, Machine Learning, Data Science, and Big Data. Whether you’re planning to build websites, automate tasks, analyze data, or explore AI, Python is an ideal starting point. It can open the door to countless career opportunities and lay the foundation for a successful future in tech. This 21-day Python course is made to help you learn Python from the very beginning and get really good at it. Becoming a true expert in just 21 days is a big goal, and it usually takes more time and practice. But if you follow this course every day and keep practicing, you will learn a lot and build a strong base in Python. The course includes both easy and advanced topics, so by the end, you’ll be much better at coding in Python. Here is the plan for the “Learn Python in 21 Days: From Beginner to Pro” course: No content found DAY TOPIC Description 1 Getting Started with Python Install Python, IDEs, write first “Hello World” 2 Variables & Data Types int, float, str, bool, type casting 3 Operators Arithmetic, logical, comparison, assignment 4 Strings – Manipulation and Methods Common string methods (len(), upper(), lower(), find(), replace(), join()), slicing, formatting 5 Input and Output input(), print(), f-strings 6 Control Flow – Conditional Statements if, elif, else, nested conditions 7 Practice + Quiz Recap with questions and simple problems DAY TOPIC Description 8 Control Flow – Loops for, while, range(), loop control 9 Lists – The Versatile Sequence Create, access, update, Common list methods (append(), insert(), remove(), reverse(), count()). 10 Tuples and Sets Immutable data types, set operations 11 Dictionaries – Key-Value Pairs Key-value pairs, dictionary methods (keys(), values(), items(), get()). 12 Functions – Building Reusable Code Defining, calling, parameters, return values 13 Lambda & Built-in Functions lambda, map(), filter(), zip() 14 Mini Project 1 CLI To-Do App / Contact Book DAY TOPIC Description 15 File I/O – Reading and Writing Files open(), read(), write(), file modes 16 Error Handling (Try-Except) try-except, finally, handling errors 17 Object-Oriented Programming (OOP) – Classes and Objects Classes, objects, methods, __init__(),self keyword 18 OOP – Inheritance and Polymorphism & Encapsulation OOP principles, class inheritance , super() function 19 Modules and Packages import, custom modules, Python libraries 20 Final CLI Project Build a calculator/quiz/task tracker with functions 21 What’s Next? Career roadmap, interview prep, learning path 📘 Week 1: Python Fundamentals Day Topic Description 1 Introduction & Setup Install Python, IDEs, write first ‘Hello World’ 2 Variables & Data Types int, float, str, bool, type casting 3 Operators Arithmetic, logical, comparison, assignment 4 Strings String methods, slicing, formatting 5 Input and Output input(), print(), f-strings 6 Conditional Statements if, elif, else, nested conditions 7 Practice + Quiz Recap with questions and simple problems 📗 Week 2: Control Structures, Collections & Functions Day Topic Description 8 Loops for, while, range(), loop control 9 Lists Create, access, update, list methods 10 Tuples and Sets Immutable data types, set operations 11 Dictionaries Key-value pairs, dictionary methods 12 Functions Defining, calling, parameters, return values 13 Lambda & Built-in Functions lambda, map(), filter(), zip() 14 Mini Project 1 CLI To-Do App / Contact Book 📙 Week 3: Intermediate & Advanced Python Day Topic Description 15 File Handling open(), read(), write(), file modes 16 Exception Handling try-except, finally, handling errors 17 Object-Oriented Programming Classes, objects, methods, __init__() 18 Inheritance & Encapsulation OOP principles, class inheritance 19 Modules & Packages import, custom modules, Python libraries 20 Final CLI Project Build a calculator/quiz/task tracker with functions 21 What’s Next? Career roadmap, interview prep, learning path

Learn Python in 21 Days: From Beginner to Pro Read More »

ChatGPT Explained: Guide to OpenAI’s Powerful Language Model

ChatGPT: The Ultimate Guide to Natural Language Processing AI Are you curious about the latest advancements in Natural Language Processing (NLP)? If so, then you have likely come across the term ChatGPT, an innovative AI technology that is transforming the way we communicate and process language. In this comprehensive guide, we will explore what ChatGPT is, how it works, and why it is becoming a game-changer in the world of NLP. We will also examine some of the potential benefits and applications of ChatGPT, including how it can be used to improve customer service, streamline workflows, and enhance user experiences. What is ChatGPT? ChatGPT, also known as Conversational Generative Pre-trained Transformer, is a deep learning-based model that utilizes Transformer architecture to generate human-like responses to natural language queries. It was developed by OpenAI, an AI research laboratory based in San Francisco, California, and was first introduced in 2020. How does ChatGPT work? ChatGPT is pre-trained on a large corpus of text data, which enables it to understand the nuances and complexities of natural language. This pre-training enables the model to generate responses to a wide range of queries without the need for additional training data. When a user inputs a query, ChatGPT analyzes the text to identify the underlying meaning and context. It then generates a response based on this analysis, taking into account various factors such as grammar, syntax, and semantics. The end result is a response that is not only grammatically correct but also contextually relevant and human-like in nature. What are the potential benefits of ChatGPT? ChatGPT has the potential to revolutionize the way we interact with technology, offering a range of benefits such as: Enhanced customer service: ChatGPT can be used to create chatbots that are capable of handling a wide range of customer queries, providing faster and more efficient support. Streamlined workflows: ChatGPT can be integrated into various workflows, enabling users to communicate with different systems and applications using natural language commands. Improved user experiences: ChatGPT can be used to create personalized experiences for users, enabling them to interact with technology in a more natural and intuitive way. Increased efficiency: ChatGPT can automate many tasks, freeing up time for more complex and high-value activities. Enhanced decision-making: ChatGPT can be used to analyze and interpret large volumes of unstructured data, providing valuable insights that can inform decision-making processes. What are some potential applications of ChatGPT? ChatGPT has a wide range of potential applications, some of which include: Customer service: ChatGPT can be used to create intelligent chatbots that can handle a wide range of customer queries, providing fast and efficient support. Personal assistants: ChatGPT can be used to create personalized assistants that can help users with tasks such as scheduling, reminders, and email management. Education: ChatGPT can be used to create intelligent tutoring systems that can provide personalized instruction and support to students. Content creation: ChatGPT can be used to generate high-quality content such as articles, blog posts, and social media updates. Healthcare: ChatGPT can be used to analyze medical data and assist healthcare professionals with diagnosis, treatment, and research. In conclusion, ChatGPT is an exciting new development in the world of Natural Language Processing that has the potential to transform the way we interact with technology. Its ability to generate human-like responses to natural language queries is a game-changer, offering a range of benefits such as enhanced customer service, streamlined workflows, and improved user experiences. With its wide range of potential applications, ChatGPT is poised to become a key technology

ChatGPT Explained: Guide to OpenAI’s Powerful Language Model Read More »

How to Download & Install XAMPP in Windows 10

What is XAMPP & Why use them for Programming ? XAMPP is a most popular free open-source software that helps programmers to write and develop the program in an easy way to in php programming language and also helps for web-developers and designers to install & run PHP-based framework software such as like WordPress, Laravel, Drupal , Joomla and others on Windows, Linux and MacOS , Other Operating Systems. XAMPP is also cross-platform web server that includes -s? – of a web-server,  MySQL Database engine and PHP and Perl programming packages and also contains Apache Distributions For Apache Server and Develop by Apache Friends. It’s comes with XAMPP Control that manage all packages of components  easily. XAMPP is a basically localhost or local server works on your own desktop and laptops. The XAMPP Full Form is : X – Cross Platform  A-Apache, M-MySQL, P-PHP, P-PERL  Apache is open-source software and cross-platform HTTP web server that plays the main role of processing the HTTP request and its default web server application. its main work is that if someone user has requests files, images and documents using browser then he serve those files to clients using http server. Apache Web Server is maintained by Apache software foundation MySQL is an open-source relational database management system (RDBMS) and freely to use in programming and its plays the role of database management system in XAMMP. With the combination of Web server Apache and PHP , MySQL offers a database storage for web-services. SQL Stands for Structured Query Language. MySQL helps the origination the information , manage, retrieve and update the data whenever you do want it. PHP full form is Hypertext Preprocessor and it’s a server-side scripting language which is embedded with an HTML  and enables users to create a dynamic content , database , session , dynamic websites and even build entire e-commerce sites. PHP is an open-source programming language and installed on all platforms and also works with a number of diverse database systems such as MySQL. It was created Rasmus Lerdorf in 1994. The Syntax of PHP is similar to C & C++. Perl is Scripting and high-level programming language that used in web development and system administration, GUI development and network programming. Perl also enables users to program dynamic content such as application, website etc. How to Install XAMPP Server in Windows & Other OS Process of Install XAMPP Server in Windows Step 1 – We install XAMMP step by step for Windows & For other Operating System such as linux, Mac OSX XAMPP Instatallation Steps are similar. So First Visit the XAMMP Website ” Apache Friends ” in your web browser. On XAMPP Wesbite’s Home Page you find the option to download the XAMMP For Main Three Platforms – Windows ,Linux , OS X. Click on First Option “XAMPP for Windows” that will be downloaded the xampp version 8.1.6 (PHP 8.1.6) for Windows and download will be starts soon. Step 2 – After this download will be completed then open the  downloads section or tab in your web browser such as in chrome click on More then click on Downloads option or Press Ctrl+J then in Downloads Click on “Show in folder” option then your Downloads Folder will open in your laptop or PC. Click on XAMPP windows installer (.exe)  in your windows then xampp setup will open and one waring message dialog box will shown then click on OK Button. Step 3 – After Clicking the XAMPP Installer (.exe),  the XAMPP Setup Wizard will be open and Now in XAMPP Setup Click on “Next” Option to further proceed.  Step 4 – After Clicking Next  ‘Select Components’ Panel shows in XAMPP Setup which is offers you install the various components in XAMPP such as Apache (default), MYSQL, FileZilla, FTPServer,  Tomcat,  PHP,  Perl,phpMyAdmin,Webalizer.According your option select whose components that you want to install and use then click on Next. Step 5 – Select the location where you want to install the XAMMP in your windows Such as C:xampp or D:xampp or any location and then XAMMP will be install on your selected location and Click on Next Option  Step 6 – Select the Language Such as “English” or Select your language do you want to choose them and use  and then Click on ‘Next’. Step 7 – once again click on ‘Next’ then after that XAMPP installation will be started and after some minutes XAMPP will be installed. Step 8 – After Installtion Complete then click on Finish then XAMPP Control Panel will open and Click on Start Button of Apache & MySQL Modules and Other Modules you have option to that start on or not and you have to start them these Modules Such as FileZilla,Mercury & Tomcat then Click on These Start Buttons. Go to browser such as Chrome or Firefox , in Url Bar ( on Upper Side Tab) type “localhost” and press Enter then XAMPP’s Dashboard will open on your browser.Hence XAMPP has fully installed now and you can also open phpMyAdmin ( MySQL) by dashboard just click on phpMyAdmin Option.

How to Download & Install XAMPP in Windows 10 Read More »

What is Python Automation & 7 Best Python Modules for Automation

What is Python Automation & Why Need it? To understand python automation we need first understand what is automation  Automation is a process that is performed an action activity is changed into one that happens naturally. in the case of python, automation is a bunch of scripts that write in a python programming language that will automate or automatically complete a lot of repetitive and boring tasks to give you more time for other things.  we write creative and time-saving simple python scripts to reduce our assistance in any task. In our daily life, many huge tasks that you might opt to automate by using python scripts. here is some common way task that uses in our daily life such as: Sorting & Replying , Sending Emails Extract & Filling Out PDF and Excel Files Website’s Headlines Emailer Ted Talk Video Downloader Table Extract from PDF Sending HTTP Requests Image Converter such as jpg to png Python Automation Libraries & Tools and Frameworks Python has Approved Open-Source License Programming and is developed under an OSI – Open Source Initiative and its libraries & Tools and Frameworks are also open sources. This means that these Libraries, tools, and frameworks boost your programming skills and efforts. in python, many ranges of python libraries exist.             Some of the Important & Famous Libraries, Tools, and Frameworks present here in this blog Python Requests & BeautifulSoup Libaries Python Requests & BeautifulSoup Module helps in Web Scrapping to extract the data from web pages and store it on your hard drive. Suppose your workday involves pulling data from a website that is tough to visit every day. in such a case scrapping could help you once a code is written it can be easily run many times, making it very especially useful when handling a large amount of data. Within Python, it’s not easy to scrap the data from web & web pages.to easy to use and in order to analyze the data and extract the data from HTML Code, the first target page must be downloaded so for downloading the target page first we use the python requests module. Python Requests is an Apache Licensed Simple HTTP Library for python in that this module allows you to send HTTP Requests using python. by this module, in python, we can post or retrieve the data from a Rest API. To use the Requests library you need first install it in python. simply type the following command in your console: pip install requests Further Many Methods are here in this module such as: GET POST PUT DELETE Selenium Library Selenium is one of the most widely & most popular modules used in python to perform testing & connect to different-different browsers. This package tool is used to automate web browser interaction from python. selenium is a powerful & open-source tool for controlling web-browsers through programs. it’s also open-source test automation tool is used to automate tests carried out in web browsers. testing web-applications on multiple web-browsers through selenium module tool. key-components are is Selenium-Webdriver, selenium-ide, selenium-grid.   SMTPLIB Library Sending Emails can be automated with python. python comes bundles with great libraries one of the great library is “smtplib library” which is used to send emails via SMTP Protocol. it’s simple to send an email using the library in python through Gmail’s SMTP Server. you need a Gmail account and also you need to set the “allow less secure apps” option is to ON and it makes it easier to gain access to data for others.  PYWINAUTO Pywinauto is a module that is use to automate the windows GUI.its allows to send keyboard and mouse actions to window controls and dialogs.also some support for complex operations such as procuring text data. PANDAS Pandas is an open-source library that provides high-performance and gives data structures & manipulation and data analysis tools for python. this library also helps the read data from a wide range of sources such as CSV, SQL Databases, JSON, and Excel Files. Pandas module enables to management of complex data operations with just one or two commands. ROBOT FRAMEWORK Robot Framework is an open-source automation framework that is used for test automation and robotic process automatic (RPA) and also includes a rich collection of tools and test libraries. it is python based, but you can also use it in java & .NET.This Framework can also test other programs or things such as : FTP MONGODB Android APIs Mainframes Facebook Twitter Youtube

What is Python Automation & 7 Best Python Modules for Automation Read More »

How to Create a Firebase Account for Android App

This blog will describe you how to create firebase account in google firebase console for any project such as Android Apps,Web-JavaScript,iOS.We will go through step-by-step instructions to create a firebase account,so here we go how to create a firebase account in google firebase. The Ultimate Guide To Create A Firebase Account Firebase founded by James Tamplin, Andrew Lee in September 2011. But in 2014 it`s accrued by Google Inc. so you need a google account to start with firebase. You can create one by clicking here. If you already have a google account please click ‘Sign in’ & sign-in your account in firebase and click to ‘Go to console’ or click Get started and you can also go to the firebase dashboard by clicking here.  Click on ‘Create a Project’  in Firebase Dashboard and after that give a project name for your project in firebase and click ‘Continue’. Add a Google Analytics in your firebase project and Click ‘Continue’ after click ‘Continue’ Select or Choose your Google Analytics account. if you have not account in Google Analytics then create a new account in Analytics.After that Configure Your Google Analytics Account and accept the all terms of Google Product and Services,Analytics terms and click a ‘Create a Project’ and your project will be create. Add or Attach Firebase to your Android Project so first enter your android package name in box and give a app nickname in firebase and click ‘Register App’ and Download the config file and place or move the google-services.json file into your android app root directory folder and after that click next and last step is add Firebase SDK into your android app project.  First Open your build.gradle(My Application) file in your android project and add dependencies in dependencies section such as ‘com.google.gms:google-services:4.3.4’ and in repositories add google() – Google’s Maven repository click on bottom ‘Sync Now’  Second one is open your build.gradle(:app) file in your project and add a dependency ‘com.google.firebase:firebase-analytics’ in dependencies section and click reagain on ‘Sync Now’. Hence your app is connected to firebase.

How to Create a Firebase Account for Android App Read More »

GTAV is available free for your PC until 21 may 2020 on epic games

IS GTAV PREMIUM EDITION FREE AT 0 COST UNTIL 21 MAY 2020? Yes, GTAV – GRAND THEFT AUTO V PREMIUM EDITION is free at 0 cost for gamers on epic games until 21 May 2020. its sales ends at 21 may 2020 8.30 pm. The Grand Theft Auto V: Premium Edition includes the complete GTAV story, Grand Theft Auto Online and all existing gameplay upgrades and content. You’ll also get the Criminal Enterprise Starter Pack.  Also get $1,000,000 bonus cash in GTA Online included with the Premium Edition as part of the Criminal Enterprise Starter Pack. You have must match the system requirements with GTAV system specification requirements until your game may be running slow or hang or anything else. First go to epic games website and Click Sign IN and sign in with epic games account if you have epic games account otherwise you can also sign in with Facebook,Google,Sony Games,Xbox Games,Nintendo account to epic games who that shows on uppersight on sign in page. you can also click sign up to create epic games account.  In Epic Game I use Google Account to Sign in to Epic Games so Click Second Icon Image – Google and then one tab open and log in or sign in your google account in epic games.after sign in one new epic game page open and two tab options shows one is Link to Existing Account and second one Link to New Account and enter the desire username or display name in Display Name Box after that click continue. After Click Continue Verify your email in epic account after verify email you will automatically move to epic game home page and then click Get GTAV Free Button.Shows in first image of the this post. After that Grand Theft Auto V Game Page will open in Epic Store and then Click GET then one new tab open Two-Factor Authentication Required and Click ‘Enable Two-Factor Authentication’ Button and a new page opens then you authenticate your account by email,sms,authenicator app in two-factor authentication and you can also create or change password and after authentication click store in menu then go to gtav game page and click again ‘GET’ and after that a new Order Tab Opens then select terms and conditions and place order in order tab. After Place Order Download it Epic Games Launcher and if you not find Epic Games Launcher then go to Front or Store Page then Click ‘Get Epic Games’ Button on right side page.after that installed it and open it and sign in it to your account and download it and installed it. You have need enough space to download and install – around size is 90GB and match your system requirements with GTAV Game specifications requirements. Build Application using Smartphone by SketchWare in 10 steps!

GTAV is available free for your PC until 21 may 2020 on epic games Read More »

What is Firebase & it’s main features and Why is important for our projects

What is Firebase and Why is Important for our project ? Firebase is a Baas Known as Backend-as-a-service and it has also mobile and web application development platform that provides all type of infrastructure and services in one place such as authentications,database,hosting,cloud messaging,storage,app indexing etc for your project app,web & iOS application and next generation application-development platform in Google Cloud System. By Firebase you can develop and create any application such as web,android,iOS because all maximum required API and services are integrated in Firebase- Firebase Console System means no need to one by one enable or create every api for your project on  Google Cloud System or Google Cloud API and you can also easily deploy or create your database. In Firebase Your Application’s Backend components such as hosting,storage,databases, messaging services,authentication,etc are operated and fully maintained by Google. Google Firebase provides Client SDKs to users that helps users to directly interact with these backend services and no need to establish any middleware (connection-communication) between your app and the service. Mainly is different from any traditional app development which in typically involves and required all frontend and backend coding and design in your application. Firebase similar as a new SDK Language Flutter and React Native JS   Main Features of Firebase 1. Authentication Firebase Authentication provides background services,SDKs and ready-made UI libraries for authenticate your app or website. Firesbase Auth gives secure and easy authentication systems to users.Firebase Auth supports authentation by phone numbers using otp,emails,usernames and passwords, third party providers like Google,Facebook,Twitter and Mircosoft More.OAuth2 is also supported in Firebase Authentation for Google,Github,Facebook and more. 2. Hosting Firebase Hosting gives you fastest and secure hosting for you app,website,web app,static and dyanmic content and also proviedes free-ssl certificate so users get a secure secure,reliable content,app,website and in firebase hosting automatically push them out web assets to our Global CDN.  3.Cloud Storage Cloud Storage provides powerful and simplest way to Store & Share user-generated data(content) like as images,videos and audio in firebase and you can easily map the data in your firebase cloud storage bucket to your firebase project. you can easily use the data in your firebase project.Firebase also gives the option on which location you have store the data. 4.Realtime Database Firebase’s Original database is Realtime Database and its the way of future in database. in most databases in every time requires http standard calls to get and sync your data and maximum databases gives only data when you ask for it. Realtime Database connecting your app or website by WebSocket not connected through http.websockets are faster than http and data is synced across all clients system in realtime and remains everytime available even your app is goes in offline. 5.Cloud Firestore Cloud Firestore is a flexible  and scalable database for web,mobile app and server development from Firebase. Its Store and sync data between users and devices at global scale using a cloud-hosted realtime-database NoSql Database. Cloud Firestore mainly designed for Enterprises uses and its offers seamless integration with other Firebase. 6.Cloud Messaging In App By Cloud Messaging You can easily send or recieve to users and more reliable way across platforms. its real-time communications way.  7.ML Kit ML Kit is a mobile SDK that provides machine learning features to your mobile app. it helps your deploy custom ML Models optimized for on-device interface which reduces your initial app installation size and make easily app updates.  8.Test Lab Google Test Lab, provides  virtual & physical devices access to test your app in real enviroment and in Google’s data-centers. Google Test Lab will also support game testing too and its a cloud-based app  testing infrastructure. 9.Notification Notification can easily sent from firebase to users and no required to additional coding for send user-focused custom notifications to the users and users can get started with firebase in free. 10.Admob With Firebase-Admob you can increase your earnings and you must have an app becuase by through admob your app will be monetize and in app custom google ads shows and you will generate revenue through ads. By Making app with firebase you must have first need basic knowledge of android and also must knowledge of android studio or vs studio. if you have not knowledge of android studio or vs studio and you have not enough knowledge of coding and android then you can also makes app by online some websites or app who helps to make your app easily and no needed to coding. one of the app is ‘Sketchware‘ who make a your app easily.Just Drag and drop widgets or components,items on screen and no needed to much coding to make your app and Here is Tutorial.By This Tutorial you can easily learn and make a app in ‘Sketchware‘ and published it to google play store. Check out this also:- Build Application using Smartphone by SketchWare in 10 steps!

What is Firebase & it’s main features and Why is important for our projects Read More »

How to Create a Menu in WordPress and Why important is it?

Today we discuss how to we create a menu in wordpress-website and why is important for our website and also discuss how to add pages,  categories,posts,custom-links to menu in wordpress. we discuss first  why create a menu in wordpress or Main Menu is Why is important for over all websites.  Why Menu is Important in WordPress-Website ? By WordPress you can easily setup and manage your website and    can do almost create anything and changes in website such as  changing and creating logo,images,header,header images,text,  menu,sub menu,etc.  In these things Menu is most important part of website that’s presents the your website structure for the users and provides the easy navigation to users and increase the usability of your website. In website menu navigation is the important factor for your website because navigation tell the people what content are available in your website and where to find it what they have need information on your website. Navigation affect your website traffic and search engine ranking. such as good navigation speed up your website and viewers search and increase performance, site ranking and website’s traffic and conversions.it’s impact your success or failure of your website and increase visitor duration & make user friendly site and decreased bounced rate so because menu is important part of the wordpress and so we next step we create a menu in wordpress website . How to Create a Menu in Wordress? For creating menu i use Astra theme in wordpress and in every page top’s of website menu presents as a horizontal bar of links that gives your site structures to visitors and users for finding content on your website. In wordpress creating menu is very easy and very simple and you can also create Sub-Menus and Dropdown Menus . in menu you can add links to your most  important pages,topics,posts and your custom links such as your social media links. so first the wordpress dashboard then click on appearance in wordpress dashboard. In Appearance Click on Menus and in Menus first give the name of the menu in Menu Name Section such as example :- my menu and then click  create menu button for create a menu in wordpress.  After Creating Menu several Left Columns options enabled now on Menu Page such as Pages,Posts,Custom Links,Categories,etc. On Next First Left Column Section is Pages and in Pages column first default Most Recent Created Pages Shows and if you can view all pages in page section then click on View All Tab and you can add all the pages or select custom pages to menu according your need and website and click Add to Menu Button then your pages will added to menu. Second Left Column Section is Posts and in menu you can also add post who have you write it and published. ON Third Left Column is Custom Links by this you can add links of any pages,website,        images,etc to menu such as example Home : Custom Link and Last Left Column is Categories. In this section you can add Categories of your website or content to menu and in all left section at the end of Click Add to Menu and Save Menu Button when you select your pages,posts,added custom links,categories. On WordPress Menu Page down Menu has settings has shows. in Menu Settings two settings or option here: 1. Auto Add Pages : By this option or section your published new pages automatically will added to your menu. 2. Display Location : By this option you can set your location of menu in your website such as front starting – primary menu,down footer- footer menu. How to Manage Menu Locations In every theme default two menu presents -Primary and Footer menu. Primary menu’s default location is top of the every page of website near by logo and appear on upper header section and footer menu is placed on footer section and which menu you created set or assign to primary menu and you can also assign this menu to footer and you also  create another menu for footer menu and other menus. Others Menus such as Secondary menu,Mobile Menu,Amp Menu,Top Bar Menu,etc have option in theme to set your menu in different locations.its have all according your theme which menus presents in theme.  Hence Today we learned how we create a menu in wordpress and you know also how to assign first menu to primary menu that placed in top of every page of website and if you do know also how to install WordPress in your system, website, etc then click here

How to Create a Menu in WordPress and Why important is it? Read More »

Connect MySQL Database to PHP with PDO & Classes

Without a database, no practical PHP application could not exist. in php, we connect MySQL database by two most common ways: MySQLi(Improved MySQL) and PDO (PHP Data Objects) and along with OOP. in this post we must use PDO way to connecting the MySQL database server to php. PDO is a database access layer which gives a quick and reliable interface for accessing,managing databases in PHP and more stable extension. PDO will support 12 different database systems, while MySQLi will support only MySQL Database System. PDO & MySQLi will also support an API ‘Object Oriented’. IF you use another database system (database) something as like ORACLE, SQLite,IBM Db2, Cubrid, Microsoft SQL Server instead of My SQL Database in PHP, PHP Applications then PDO is Best Option of PHP. just change connection string and a few queries.it’s support Prepared statements.it’s also prevents SQL Injection Queries Attacks in PHP. in PHP 5.1 or Above Version  PDO_MySQL and PDO_SQLITE Driver is pre-default installed and enabled but only one extension default enabled ‘mysql . if you check what PDO Database System Drivers installed in PHP or your System then create a new PHP file and add the following code into it Example Download <?php print_r(PDO::getAvailableDrivers()); ?> Connecting to MySQL Database Basic Syntax : PHP-PDO DSN Connection String $pdo = new PDO(“mysql:host=hostname;dbname=database”, “username”, “password”); PDO accepts the given parameters for specifying the database source (known as DSN) which have contains the database servername or hostname  such as localhost or remote IP address ,database name and other optional parameters such as username and password that helps for connecting to database server.its creates a connection between php,php applications & database server.  to connect to mysql server, you must use the following data source name or above written syntax code example.the above written syntax code is some different because we use (OOP) classes and function in code.  $pdo = new PDO(“mysql:host=” . $this->db_host .”;dbname=” . $this->dbname, $this->db_user , $this->db_pass); Example Download <?php $db = new db(); class db { private $db_host = “localhost”; private $db_user = “root”; private $db_pass = “”; private $dbname = “test” ; public $error; protected function connect() { // $pdo = new PDO(“mysql:host=” . $this->db_host .”;dbname=” . $this->dbname, $this->db_user , $this->db_pass); $dsn = “mysql:host=” . $this->db_host .”;dbname=”.$this->dbname; $pdo = new PDO($dsn, $this->db_user , $this->db_pass); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); return $pdo; } public function __construct() { $sql = “CREATE TABLE users ( name VARCHAR(111) NOT NULL , username VARCHAR(111) NOT NULL UNIQUE , password VARCHAR(111) NOT NULL ) ENGINE = InnoDB”; if($stmt = $this->connect()->query($sql)) { echo “Table created”; } else { echo “Table already created or Another Problem”; } } } ?> Check out this also:- You Can Call Police Without SIM Without Balance

Connect MySQL Database to PHP with PDO & Classes Read More »

How to Create a Navigation Menu Without Bootstrap

Menu is the most important part of the every website and every web programmer & designer firstly create menu for website so today i will create the navigation menu without bootstrap and js query & you have the basic knowledge of html and css for making navigation menu. In html external css use and also use <nav> element instead of <div> element (tag) because <nav> tag is newer in html 5 than <div> tag but you have write <!doctype html> tag at the top of the website or webpage without this you can’t use nav tag in website. HTML CODE Index.html Download <?!doctype html> <html> <head> <meta charset=”utf-8″> <title>Navigation Menu</title> <link href=”style.css” type=”text/css” rel=”stylesheet”> </head> <body> <nav> <ul> <li><a href=”#”>HOME</a></li> <li><a href=”#”>PHP</a></li> <li><a href=”#”>PYTHON</a></li> <li><a href=”#”>CSS</a></li> <li><a href=”#”>JAVA</a></li> <li><a href=”#”>JS</a></li> </ul> </nav> </body> </html> CSS CODE Style.css Download @charset “utf-8”; /* CSS Document */ nav{ display:block; background-color:steelblue; width: 60%; height: 4rem; text-align: center; border-radius: 20px; } nav ul{ display:flex; width:auto; height: 100%; list-style: none; margin-right: auto; align-items:center; /* justify-content:space-between;*/ } nav ul li { width: 120px; margin: 15px; padding: 15px; } li:before { display: flex; right: 50%; bottom: 0; width: 0px; height: 2px; background-color:white; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; } li:after { display: flex; width: 0px; left: 50%; content: “”; bottom: 0; height: 2px; background-color:white; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; } li:hover { background-color:slategray; border-radius: 5px; opacity: 0.9; } li:hover:before, li:hover:after { width: 100%; } nav ul li a { color:whitesmoke; text-decoration: none; font-family:Gotham, “Helvetica Neue”, Helvetica, Arial, “sans-serif”; font-size: 18px; } Source Code

How to Create a Navigation Menu Without Bootstrap Read More »

How to Configure Visual Code Studio for Python

Hello Friends, Today I show you how to configure visual studio code (vs code) for python. you need python compiler to run the python program and many python compilers come in vs code so which have you choose python compiler depends on you. So, First, you have installed the vs code & python in your system, if you have not to install vs code, if you no know how to install them into the computer so click here and also if you no know how to install python into system then click here otherwise then go to next step. Let’s open your vs code and first create a folder where you can save python files and projects & open folder in vs code which have you created and click New or Open your python file and write some code and save it to index.py or another name.py extension. On the right side screen message shows up “The Python extension is recommended for this file type”. this extension is a compiler for python who’s that compile or runs your python file. Install this Python Extension in your vs code for your python files and some seconds wait until it has completed now. Now, it’s time to compile or run the program so you have many options to compile the code into vs code. The first option is press F5 then you see the debug configuration then select the Python file into the debug configurations section. The second option is that you can run the program directly into python terminal. Just right-click and select the option “Run python file in Terminal” then program output shows into python terminal. The third option is fixed-configuration and just one click output will be shown. so first click debug option from left side vs code then click add configurations or click configuration button(third) then now one file will open ‘launch.json’ then now type python in the file and enter the python then one box open & select the python file option and press enter. after press enter python configuration lines automatically added in launch.json then save it, after all, that open your python file (index.py) & click upper left side debug button (Green) then your output will be shown. Hence, Your python configuration has completed now you can easily compile and run the python program. 

How to Configure Visual Code Studio for Python Read More »

How will Install The WordPress on the own system

Guys, Installing WordPress locally on your system is the first choice & best option for your website and you can easily practice, test & make your website after all this you can do upload a website on live server.You can also easily update & fix errors of the website. you have some basic knowledge of web development for installing WordPress on your local system & need a localhost server application. many localhost server applications available as xampp, wamp & desktop server, etc. in this tutorial, we use xampp for WordPress install on your system.if you not known how to install xampp then click here otherwise downloaded it & install it on your system, if you are already installed xampp on your os (system) then directly go to next step to download the WordPress. Go to https://wordpress.org/download/ and click download WordPress latest version something like 5.2.3 & wait some time. after this, your WordPress has been downloaded. Extract the WordPress-5.2.3.zip by using any zip,rar software (Winrar) or self windows in your system. Copy WordPress Folder (Extracted Folder) and make a folder in C:xampphtdocs & rename your folder. For this tutorial, we shall be renaming the folder to ‘site’ & paste into the site folder. Open Browser and Type ‘localhost/site’ and press enter & then you will be see wordpress setup in your browser & Select your according preferred language & click continue. After click continues WordPress welcome page shows & provides information of database name, username & password of your database & host then click Let’s go!. So first open browser type http://localhost/phpmyadmin/  then PHPMyAdmin is opened now & click the database and create database ‘WordPress’ or according to preferred name your database create then move to next steps. After click Let’s go! & creating a database a page shows on your web browser that of your WordPress setup. in page enter the database name & username – root & password – blank or if you have created a different username in your PHPMyAdmin or MySQL then provides or enters username & password where I enter the username – root & password – blank and enter the database host ‘localhost’ and click submit. In next steps click ‘Run the installation’ after all these steps then in the next step, the WordPress login page setup shows where you set the username & password & email of your WordPress and click install WordPress. Now, Your WordPress has been installed and message shows ‘Thank you, and enjoy!. after this click login. In WordPress login page enter the username or email & password of your WordPress & click Login. After a successful login, your control panel or WordPress admin page opens. you see all details and settings in the WordPress dashboard (WP-admin) page. Customize your website or WordPress as change themes, plugins, create menus, pages, etc and type ‘localhost/site’ in your browser. Check out this our youtube channel video also:- ₹80k / – Ulimate Gaming PC Build 2020 With Ryzen 5 3600X & RTX 2060 Super

How will Install The WordPress on the own system Read More »

How to install MAC Utility on your system

This article leads to who has applied for pan cards in utiitsl as CSC vle’s, retailer, shopkeepers, private id company. without this, you can’t apply a new pan card, not changes in your pan card such as name, dob, father name, etc. its compulsory for who’s work in utiitsl.so here are steps for installing mac utility in your system & also required JDK (java develop kit) or JRE (java runtime environment) java in your os. First, you have a login or visit the (utiitsl) respective portal then download it according to your system (x86-x64). Extract macutility.zip file and place or copy to c or  d drive mac utility folder in the system then install java (JRE java package) on your system. Download the JRE package from this main link: ‘‘https://www.oracle.com/technetwork/java/javase/jre8-downloads-2133155.html’’ Otherwise the user can also download  the JRE Java Package from google drive for Windows 32/Windows 64 bit OS. google drive link: https://drive.google.com/drive/folders/1Mfk9RH3erGIdqS2VkHMy74-R4Eevdqlr?usp=sharing.  You can easily download java packages from google drive. Click Next & Again Click Install Hence, after some time your java will be installed and then set JRE_HOME Environment Variable in your system settings by pointing to the JRE installation folder, for example, C:Program FilesJavajre1.8.0_221 & press OK. Open Command prompt (cmd) or Cmd Run as administrator then type cd & C: or D: where your mac utility folder placed in drive Type cd mac utility & service.bat install in command prompt (cmd). Hence, Mac Utility has installed now & Service has running on your os & now you can do all services of pan card in Utiitsl and if any problem comes in installation then comment or email us & we will find or solve the problem and if you download mac utility 32 bit then rename folder macutility32 to mac utility. 

How to install MAC Utility on your system Read More »

How to install Visual Studio Code (VS Code) on your System

Visual Studio Code is a lightweight but powerful & free open source code editor developed by Microsoft which runs on all os platforms such as windows,linux.its redefined and optimized for building and designing web and cloud applications. so i today tell how to download it and installs on system. Just type vs code or visual studio code then in google vs code website will be seen. Click Download for Windows or Other platforms then your setup will be download. after downloaded open folder where your setup has saved then click on it . Accept the agreement & Click Next Set Installation Folder & Click Next Checks all options and click Next Hence, Your Visual Studio Code (VS Code) has installed now. You Can programming and Coding in Visual Studio Code and Next Post or Steps we will configure vs code for programming languages as like python ,php, etc.

How to install Visual Studio Code (VS Code) on your System Read More »

How to Create a Business Email Using Amazon Web Services

Guys Today I tell you how to create a Business or Professional email using amazon web services. You have domain and amazon web services (aws) account to create a business email. In amazon web services (aws) I choose Work Mail Service for email. So First Step is Login the amazon web services account if the account is not created then first creates the amazon web services account so sign in to the console or login aws account then second is search the work email service in AWS Management Console or select the work mail in Business Application of AWS console. I Prefer Quick Setup Because its Simple & Easy, If You have advance knowledge of web & email server then go to Standard Setup otherwise go with Quick Setup & Click Quick Setup after that enter the organization name & click create then your organization has been created. Hence, Your Organization has been creating & wait some minutes (approx 2 min) then its will be activated after that click your organization or open the work mail directory. Go to Domains Section on your WorkMail and click Add Domain & Enter the Domain & Add a Domain in your work mail Directory & after that domain ownership verification & mail setup has come so added the record sets in your domain .login your domain in your domain’s service provider such as (Godaddy,Bigrock, Google Cloud,Amazon) and go to domain manager or Click DNS & Add Records sets in your’s Domain (As Image Shown Below) because without this or recordsets values & hostname values you can’t verify the domain in amazon work mail. After adding TXT, MX, CNAME Record Types & Values & Hostname in your domain verify the status into Amazon Workmail as show in the image below. After Verify the Ownership & Mail Setup then Click Users Section Upper Left Side of Amazon Work Mail & Create the Username & Enter the First & Last Name after that Click Next Then Set the Email Address ( Added Your Domain into Email Address TextBox ) & Password then click Next or Finish. Hence, Your Professional Email is Created Now. Your Display Name & Username & Primary email address, Status has been shown, so login your email id within your username and password who have you created it..username+domain is your default professional email address.

How to Create a Business Email Using Amazon Web Services Read More »

How to Setup Pycharm For Python Django Development​

Pycharm is an IDE( integrated development environment) for Python Development. Pycharm developed by JetBrains. it’s very popular around python programmers. It’s easy to use and versatile for any python development like we all know python may be a dynamic language, therefore, we’d like a strong IDE permanently for good software development and Pycharm is one of them. So we are going to set up a Python environment for Django. So it will help us to improve productivity and all the files and packages will in the Virtual environment so it will not affect your system if so let’s start. First Download & Install the Python from https://www.python.org/downloads/. if you do not know how to install python in your system then click here otherwise move to next process to install Pycharm. Here is The Steps of Pycharm Python Just Type pycharm in Google and click this website https://www.jetbrains.com/pycharm/ As you can see there are two version of pycharm one is professional version (paid with 30 days free trail) and second one is community version (free), if you are beginner then i suggest you go with the (free) community edition & click here. i select professional edition for pycharm & click  Download   Now Find The Downloaded File into the system it’s maybe saved location is “downloads” and Simply Click on it to run then setup will be displayed on your screen Just Simply Click Next & Move on to further process Set The Destination Folder where you want to install Check all three sections as 64-bit launcher ,etc and click next Click Install & Wait Some Minutes Check Run PyCharm and click Finish. You can also run PyCharm from System desktop Select ‘Do not import settings’ & Click OK Click on create a new project & on the main menu select Django from left side list and set project location where you want to save project & select the base interpreter (python 64 or 32 bit), if base interpreter shows none then set or give the location of python.exe where your python has installed and given the application name & click create. Hence, Django Python Project is Ready Now.

How to Setup Pycharm For Python Django Development​ Read More »

How to Create a Complete Login System in PHP || Session & Encryption Included with MySQL Database

People In Websites or Web Pages, Login System isn’t basic and not especially troublesome. So Today I Will Create The Full Login System . I will Create First Registration System then Login System in PHP using MySQL Database With XAMPP AND phpMyAdmin using Session system &  password_hash function method technique. With My Opinion Creating of Login System, First We Need a Specially Database in light of the fact that without database you probably won’t be completely use login system or page in sites or website pages, as in login system you do give subtleties, for example, username ,secret key or and so on , server or system can’t confirm the subtleties without database and its gets blunder if utilize brief area since system initially check subtleties whose you gave from database, so its essential. After That Good and Simple Code is needed.You Can Also Try Advanced Code But not utilize Complex Code. In PHP Programming, Many Codes are accessible of Login System whose that keeps running on various distinctive conditions and Platforms,Ways.So I Will Create  Login System in Easiest Way includes Registration System & Session System & Logout Function .  In Previous Login Tutorial Post i created the login system without encryption and stores data (username and password) in plain text in Database. But in this login tutorial post i use password_hash & password_verify encryption function method technique to store password into database . Here is Steps & Source Code of PHP login system First Open phpMyAdmin or MySQL by Localhost (Using XAMPP or WAMP). Create a Database Login & Table User. Second one is Create a Index.php & Config.php (Registration System) . Third is to Create a Login.php and Welcome.php & Session.php (Login System) . Building Registration System In this area we’ll construct a registration system that enables clients to make another record by rounding out a web structure. In any case, first we have to make a table in database that will hold all the client information. 1.Creating the Database Table Execute the following MySQL query to create the table user inside MySQL database. Example Download CREATE TABLE `user` (`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT, `username` VARCHAR(111) NOT NULL UNIQUE ,`password` VARCHAR(255) NOT NULL , created_at DATETIME DEFAULT CURRENT_TIMESTAMP) ENGINE = InnoDB; 2.Create the Index.php Example Download <?php // Registration Page include(‘config.php’); if(isset($_SESSION[‘username’])){ header(“location: welcome.php”); // Redirecting To Welcome Page exit(); } if ($_SERVER[‘REQUEST_METHOD’] == “POST”){ if (!empty(trim($_POST[‘username’]))) { // Prepare a select statement $sql = “SELECT id FROM user WHERE username = ?”; if($stmt = mysqli_prepare($conn, $sql)){ // Set parameters $check_username = trim($_POST[‘username’]); // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, “s”, $check_username); // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)){ /* store result */ mysqli_stmt_store_result($stmt); if(mysqli_stmt_num_rows($stmt) == 1){ $userpass_err = “This username is already taken.”; } elseif(strlen(trim($_POST[‘password’])) < 6 ) { $password_err = “Username OK ! Password has must alteast 6 Characters”; } else { $username = trim($_POST[“username”]); $password = trim($_POST[“password”]); $sql = “INSERT INTO user (username, password) VALUES (?, ?)”; $stmt = mysqli_prepare($conn, $sql); // Set these parameters $param_username = $username; $param_password = password_hash($password, PASSWORD_DEFAULT); mysqli_stmt_bind_param($stmt, “ss”, $param_username, $param_password); // Try to execute the query if (mysqli_stmt_execute($stmt)) { $suc = “Registered Sucessfully”; //Sucessful Message Pass Or Show header(‘refresh:5; url=login.php’); // Redirecting To Login Page } else { echo “something Wrong”; } mysqli_stmt_close($stmt); } } } } } mysqli_close($conn); ?< <html> <head> <link rel=”stylesheet” type=”text/css” href=”style.css”> </head> <body> <div> <h2>Welcome</h2> <form method=”post” action=”” enctype=”multipart/form-data”/> <input type=”text” name=”username” placeholder=”Username” required autofocus /> <input type=”password” name=”password” placeholder=”Password” required/> <br><span><?php echo $userpass_err;?> <?php echo $password_err; ?> <?php echo $suc; ?></span></br> <center><input type=”submit” value=”Create Account” name=”login_user”/></center></form> <div>Already Registered</div><a href=”login.php”><input type=”submit” value=”Click Here” name=”Click Here” /></a> </div> </body> </html> Firstly Script Checks the username is empty or not, if username is not empty then script will further move otherwise generate error. Second Checks the username is available in the database, if available then generate error message otherwise further moves to store username & password. Third one is checks the password is greater than 6 char otherwise populate error message. after this script or program store the username in plain text and password in encryption mode. last generate success message ‘registration successfully & move on to login page in 5 seconds. Layout of the Sign Up Form Page 3.Create the Config.php Example Download <?php session_start(); $suc = ”; $user_err = ”; $userpass_err = ”; $password_err = ”; $username = $password = “”; $check_username = $param_username = $param_password = ”; // Connection To Database My SQl & Main Root User $conn = mysqli_connect(“localhost”,”root”,””) or die (“could not connect”); // Selecting Database into MySQL Server (phpMyadmin) mysqli_select_db($conn,”login”) or die (“could not find database”); if($conn === false){ die(“ERROR: Could not connect. ” . mysqli_connect_error()); } ?> Declare Variables to Store Error and Success Message. Connecting to Mysql Database Server using mysqli_function & main root user otherwise generate error. Selecting to database into server. 4.Style.css Example Download @charset “utf-8″; /* CSS Document */ h2 { text-align: center; font-size:30px; display:block; text-transform: uppercase; margin: 0 auto; font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } h1 { color: whitesmoke; font-weight: 500; } .h2 { text-align: center; font-size:16px; display:inline-block; text-transform: uppercase; font-family: inherit; top:1px; font-weight: 500; line-height: 1.1; color:black; } .box { background:white; border:2px solid hsla(0,11%,89%,1.00); border-radius:100px; } .col1{ color:peru; font-weight: 500; } .wrapper{ width:420px; height:460px; position:relative; margin: 10px 0px 0px 30%; background-color:#fff; text-align: center; border: 4px solid #B0C4DE; border-bottom: none; border-radius: 10px 10px 0px 10px; padding: 21px; } .img { background: url(images/back.jpg); } .col3 { background: url(images/04.jpg) center; } .form-signin{ display:block; width:400px; border: 1px solid rgba(0,0,0,0.1); padding: 5px; margin-left:3px; background:#6C0; color:#FFF; } .col { background-color:sandybrown; color: white; font-weight: 500; } .checkbox { margin-bottom: 28px; font-weight: normal; } input[type=”text”] { color: #0d0d0d; text-align: center; display: inline-block; font-size: 16px; width: 87%; height: 44px; margin: 20px 12px 10px 10px; border: 2px solid #f6f6f6; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -ms-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 2px 2px 2px 2px; } input[type=”password”] { color:

How to Create a Complete Login System in PHP || Session & Encryption Included with MySQL Database Read More »

install the python

How to Install the python in your own system | Windows 10

Doing coding & programming in python we need first install the python in the system. First downloaded the python software from python.org so select the python file & version according to your os. you can also go to the direct download page i.e python.org/downloads/. Choose the Python file according to your architecture ( x86-x64). I select x-64bit new python version python-3.7.4-amd64.exe. Open your folder or found the path where your python setup has downloaded.click that python-3.7.4-amd64.exe then your setup will opened. Apply Check on “Installer launcher for all users (recommended)” & Add Python 3.7 to PATH. Hence, Waiting Some minutes Your Python has been installed.Now Click Close.  Search or Write cmd and then run cmd in your system then your cmd will be open, Type python in cmd then your python has opened and now you can do it programming and coding in python.

How to Install the python in your own system | Windows 10 Read More »

How to Connect PHP to Database using MySql & XAMPP

Make MYSQL DATABASE IN PHPMYADMIN AT THE LOCALHOST PHPMyAdmin is a control panel from where you can manage the database that you have created. Open your browser and type localhost/ then xampp page will open then click PHPMyAdmin after that PHPMyAdmin will open now then Click Database or New on Left Side phpMyadmin Page. Creating a Database at phpMyAdmin Name your database as per your needs. I am naming it ‘test’ database. To enter the name of the database in the text box then click create and your database will be made. Creating a Folder in Server ( XAMPP, Hosting Server, Wamp ) First Create a Folder in your according sever. in the event that you use xampp, at that point go to C:/xampp/htdocs/or on the off chance that you use wamp, at that point go to C:/wamp/www . on the off chance that you use web facilitating server as Cpanel, GoDaddy, big rock, etc, at that point your main directory or folder is public_html or www or htdocs or your domain directory . After that then create a folder and name it as per your need. I name it to ‘site’ . in folder create or save a PHP file and name it to ‘config.php’, ‘db.php’, ‘connect.php’, ‘database.php’ according to you need. I name it to index.php.Write the following code in your PHP file. Example Download <?php $error = “”; $success = “”; if($_SERVER[“REQUEST_METHOD”] == “POST”){ if(isset($_POST[‘connect’])){ $db_hostname = “localhost”; // Server Name Localhost $db_user = “root”; // Database Username or Host $db_pass = “”; // Password of Database Username or Host – $db = “test”; //Connecting to Database or Mysql Server $conn = mysqli_connect($db_hostname,$db_user,$db_pass) or die (“could not connect”); mysqli_select_db($conn,$db) or die (“could not find database”); if($conn) { $sql = “CREATE TABLE user ( name VARCHAR(111) NOT NULL , username VARCHAR(111) NOT NULL UNIQUE , password VARCHAR(111) NOT NULL ) ENGINE = InnoDB”; if(mysqli_query($conn,$sql)) { $success = “Table user is Created”; } else { $error = “Table Already Exist or Another Problem”; } } else { $error = “connection error”; } } } ?> <html> <head> <link rel=”stylesheet” type=”text/css” href=”style.css”> <head> <body> <div> <h2>SQL Connection Test</h2> <form method=”post” action=”” enctype=”multipart/form-data”> <center><input type=”submit” value=”Connect to MySQL Database” name=”connect”/></center> </form> <span style=”color:#6C0; font-size:25px;”><?php echo $success; ?></span> <span style=”color:#930; font-size:25px;”><?php echo $error; ?></span> </div> </body> </html> Example CSS Download @charset “utf-8”; /* CSS Document */ /* Style.css */ h2 { text-align: center; font-size:30px; display:block; text-transform: uppercase; margin: 0 auto; font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } .h2 { text-align: center; font-size:16px; display:inline-block; text-transform: uppercase; font-family: inherit; top:1px; font-weight: 500; line-height: 1.1; color: inherit; } .wrapper { width:420px; height:400px; position:relative; margin: 60px 0px 0px 30%; background:url(back.jpg) ; text-align: center; border: 4px solid #B0C4DE; border-bottom: none; border-radius: 10px 10px 0px 10px; padding: 21px; } .form-signin { display:block; width:400px; border: 1px solid rgba(0,0,0,0.1); padding: 5px; margin-left:3px; border: 1px solid #B0C4DE; background:#333; color:#fff; } . .checkbox { margin-bottom: 28px; font-weight: normal;} input[type=button], input[type=submit], input[type=reset] { background-color: #56baed; border: none; color: white; display:inline-block; padding: 15px 80px; text-align: center; text-decoration: none; display: inline-block; text-transform: uppercase; font-size: 14px; -webkit-box-shadow: 0 10px 30px 0 rgba(95,186,233,0.4); box-shadow: 0 10px 30px 0 rgba(95,186,233,0.4); -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; margin: 140px 20px 40px 20px; -webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -ms-transition: all 0.3s ease-in-out; -o-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; } input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover { background-color: #39ace7; } input[type=button]:active, input[type=submit]:active, input[type=reset]:active { -moz-transform: scale(0.95); -webkit-transform: scale(0.95); -o-transform: scale(0.95); -ms-transform: scale(0.95); transform: scale(0.95); }

How to Connect PHP to Database using MySql & XAMPP Read More »

Create a User Login System in PHP with MySQL Database

Guys, In Websites or Web Pages, Login System isn’t simple and not particularly much difficult.Today I Will Create of login System (Example) for all’s.I Will Create a Login System in PHP with MySQL Database utilizing Session  and we use xampp  and phpMyAdmin . With My Opinion Creating of Login System, Specially First We Need a Database in light of the fact that without database you probably won’t be completely used login system or page in sites or website    pages, as in login system you do provide input data,  For example, username , secret key, password  and so on , server or system can’t verify the your input data without database and its gets error or warning if utilize brief area since system initially check input data whose you gave from database, so its essential.  After That Good and Simple Code is needed. You Can Also Try Advanced Code But not utilize Complex Code. In PHP Programming, Many Codes are accessible to Login System whose that keeps running on various distinctive conditions and Platforms, Ways. So I Will Create the ONLY Login System in The Easiest Way. Here is Steps & Source Code of PHP login system First Open phpMyAdmin or MySQL by Localhost (Using XAMPP or WAMP). Create a Database Login & Table User. The Second one is Create an Index.php Third is to form a Login.php and Welcome.php & Session.php try and simply place or Insert Demo or Basic Values in Table User . SQL Query:- Example Download CREATE TABLE `usrlogin` (`id` INT(111) NOT NULL PRIMARY KEY AUTO_INCREMENT, `usrname` VARCHAR(111) NOT NULL UNIQUE ,`password` VARCHAR(111) NOT NULL , created_at DATETIME DEFAULT CURRENT_TIMESTAMP) ENGINE = InnoDB; /* INSERT Just demo values */ INSERT INTO `user` (`usrname`, `password`) VALUES (‘admin’, ‘pass123’); Index.php Example Download <?php include(‘login.php’); ?> <style type=”text/css”> body{ font-size:14px; background:url(images/back.jpg) no-repeat; font-family:”Courier New”, Courier, monospace; height:100%; width:100%; } .form input[type=’password’], .form text, .form select, .form textarea, .form input[type=’text’] { width:100%; border: 1px solid #eee; padding:10px; margin-bottom:5px; outline:none; display:block; resize:vertical; } .form input[type=’submit’] { margin-top:5px; margin-bottom:5px; } .widget { margin-bottom:10px; width:460px; height:280px; margin-left:400px; background-color:#fff; } .widget .widget-heading{ background:#F9F7F7; border: 1px solid #eee; padding:10px; font-weight:bold; text-align:justify; } .widget .widget-contents { padding:10px; border-bottom: 1px solid #eee;} .button { width: 100px; height: 32px; color:#39F; border: medium none; font-size: 14px; margin: 24px auto; text-transform: uppercase; } </style> <title>Login Panel</title> </head> <body> <div> <div>Login Panel</div> <div> <form id=”login” action=”login.php” method=”post” enctype=’multipart/form-data’/><fieldset> <div> <label>Username</label> <input type=”text” name=”usrname” /> </div> <div> <label>Password>/label> <input type=”password” name=”password” /> </div> <div> <input type=”submit” value=”Login”/></div <span><?php echo $userpass_err; ?></span> </fieldset> </form> </div> </div> Login.php Example Download <?php session_start(); if(isset($_SESSION[‘user’])){ header(“location: welcome.php”); // Redirecting To Welcome Page exit; } // Define Variables To Store Error Message and initialize with empty values $username = $password = “”; $userpass_err = ”; // Processing form data when login form is submitted if($_SERVER[“REQUEST_METHOD”] == “POST”){ // Checking if Username & Password is not Empty if(!empty($_POST[‘usrname’]) && !empty($_POST[‘password’])){ // Define $username and $password $username = $_POST[‘usrname’]; $password = $_POST[‘password’]; // Connecting to MySQL Database Server By Using mysqli_connect function $connect = mysqli_connect(“localhost”,”root”,””) or die (“could not connect”); // Selecting Database into MySQL Server (phpMyadmin) mysqli_select_db($connect,”usrlogin”) or die (“could not find database”); //Sql Query To fetch information of registerd users and finds user match. $sql = “SELECT usrname, password from usrlogin where usrname=? AND password=? LIMIT 1″; // To protect MySQL injection for Security purpose $result = mysqli_prepare($connect,$sql); mysqli_stmt_bind_param($result,”ss”, $username, $password); mysqli_stmt_execute($result); mysqli_stmt_bind_result($result,$username,$password); mysqli_stmt_store_result($result); if(mysqli_stmt_fetch($result) == false) { echo “Invalid Username or Password Check Again”; } else { // Store data in session variables $_SESSION[‘user’] = $username; // Redirect user to welcome page header(“location:welcome.php”); exit(); } //Closing Sql Connection mysqli_close($connect); //Close statement mysqli_stmt_close($result); } else { $userpass_err = “Enter The Username or Password or Both”; echo “$userpass_err”; } } ?> Welcome.php Example Download <?php include(‘session.php’); // Check if the user is logged in, if not then redirect him to login page ?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>Untitled Document</title> </head> <body> <h1><center>Welcome To Rajindera Comp</center></h1> <h2>center>You Successfully Login</center></h2> <center> <img src=”images1.png” align=”bottom” height=”200px;” /></center> </body> </html> Session.php Example Download <?php // Connecting to MySQL Database Server By Using mysqli_connect function $connect = mysqli_connect(“localhost”,”root”,””) or die (“could not connect”); // Selecting Database into MySQL Server (phpMyadmin) mysqli_select_db($connect,”usrlogin”) or die (“could not find database”); session_start();// Starting Session // Storing Session $user_check=$_SESSION[‘user’]; // SQL Query To Fetch Complete Information Of User $ses_sql=mysqli_query($connect, “select usrname from usrlogin where usrname=’$user_check'”); $row = mysqli_fetch_assoc($ses_sql); $login_session =$row[‘usrname’]; // Closing Connection mysqli_close($connect); ?>

Create a User Login System in PHP with MySQL Database Read More »